Commit a560c24b by Chris Dodge

add error response when trying to remove a user which does not exist

parent 271c46d5
......@@ -601,7 +601,9 @@ def remove_user(request, org, course, name):
raise PermissionDenied()
user = get_user_by_email(email)
if user is not None:
if user is None:
return create_json_response('Could not find user by email address \'{0}\'.'.format(email))
remove_user_from_course_group(request.user, user, location, EDITOR_ROLE_NAME)
return create_json_response()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment