mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-03 16:10:26 +00:00
add trans in participant (#4533)
This commit is contained in:
@@ -110,14 +110,14 @@ class FileParticipantsView(APIView):
|
|||||||
|
|
||||||
# permission check
|
# permission check
|
||||||
if not seafile_api.check_permission_by_path(repo_id, '/', user.username):
|
if not seafile_api.check_permission_by_path(repo_id, '/', user.username):
|
||||||
error_dic = {'email': email, 'error_msg': 'Permission denied.', 'error_code': 403}
|
error_dic = {'email': email, 'error_msg': _('Permission denied.'), 'error_code': 403}
|
||||||
failed.append(error_dic)
|
failed.append(error_dic)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# main
|
# main
|
||||||
try:
|
try:
|
||||||
if participants_queryset.filter(uuid=uuid, username=email).count() > 0:
|
if participants_queryset.filter(uuid=uuid, username=email).count() > 0:
|
||||||
error_dic = {'email': email, 'error_msg': 'Participant already exists.', 'error_code': 409}
|
error_dic = {'email': email, 'error_msg': _('Participant already exists.'), 'error_code': 409}
|
||||||
failed.append(error_dic)
|
failed.append(error_dic)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
@@ -126,7 +126,7 @@ class FileParticipantsView(APIView):
|
|||||||
success.append(participant)
|
success.append(participant)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(e)
|
logger.error(e)
|
||||||
error_dic = {'email': email, 'error_msg': 'Internal Server Error.', 'error_code': 500}
|
error_dic = {'email': email, 'error_msg': _('Internal Server Error.'), 'error_code': 500}
|
||||||
failed.append(error_dic)
|
failed.append(error_dic)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user