project_manage_users: Prevent internal error when the user can't be found.
This commit is contained in:
parent
fe148e1e6b
commit
54f3ca6924
@ -317,6 +317,9 @@ def project_manage_users():
|
|||||||
{'username': 1, 'email': 1,
|
{'username': 1, 'email': 1,
|
||||||
'full_name': 1})
|
'full_name': 1})
|
||||||
|
|
||||||
|
if not user:
|
||||||
|
return jsonify({'_status': 'ERROR'}), 404
|
||||||
|
|
||||||
user['_status'] = 'OK'
|
user['_status'] = 'OK'
|
||||||
return jsonify(user)
|
return jsonify(user)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user