mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-23 17:01:35 -05:00
Replaced first queries with one queries, which throws a NoResultFound.
Able to remove many of the None checks as a result of this. Fixed the tests were needed.
This commit is contained in:
@@ -34,8 +34,4 @@ def get_invited_user_by_token(token):
|
||||
|
||||
invited_user = get_invited_user_by_id(invited_user_id)
|
||||
|
||||
if not invited_user:
|
||||
message = 'Invited user not found with id: {}'.format(invited_user_id)
|
||||
return jsonify(result='error', message=message), 404
|
||||
|
||||
return jsonify(data=invited_user_schema.dump(invited_user).data), 200
|
||||
|
||||
Reference in New Issue
Block a user