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:
Rebecca Law
2016-03-11 15:34:20 +00:00
parent ef5969be77
commit 123b0ead3a
14 changed files with 26 additions and 66 deletions

View File

@@ -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