Skip to content

Commit

Permalink
format-optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
r350178982 committed Jun 11, 2024
1 parent 323d0f7 commit 5cbd3e7
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions seahub/api2/endpoints/admin/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -2137,9 +2137,7 @@ def post(self, request):
error_msg = 'Feature is not enabled.'
return api_error(status.HTTP_403_FORBIDDEN, error_msg)


username = request.data.get('email')

if not username:
return api_error(status.HTTP_400_BAD_REQUEST, 'email invalid.')

Expand All @@ -2150,7 +2148,6 @@ def post(self, request):
error_msg = 'User %s not found.' % username
return api_error(status.HTTP_404_NOT_FOUND, error_msg)


if is_org_user(username):
error_msg = 'User is already in team.'
return api_error(status.HTTP_400_BAD_REQUEST, error_msg)
Expand Down

0 comments on commit 5cbd3e7

Please sign in to comment.