mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-24 01:11:38 -05:00
Add the right password check
This commit is contained in:
@@ -56,7 +56,7 @@ def update_user(user_id):
|
||||
user_to_update = get_model_users(user_id=user_id)
|
||||
req_json = request.get_json()
|
||||
pwd = req_json.get('password', None)
|
||||
if not pwd:
|
||||
if pwd is not None and not pwd:
|
||||
raise InvalidRequest('Invalid entry for password', status_code=400)
|
||||
save_model_user(user_to_update, update_dict=req_json, pwd=pwd)
|
||||
return jsonify(data=user_schema.dump(user_to_update).data), 200
|
||||
|
||||
Reference in New Issue
Block a user