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

@@ -156,7 +156,7 @@ def get_user(user_id=None):
return jsonify(data=result.data)
@user.route('/<int:user_id>/service/<service_id>/permission', methods=['POST'])
@user.route('/<int:user_id>/service/<uuid:service_id>/permission', methods=['POST'])
def set_permissions(user_id, service_id):
# TODO fix security hole, how do we verify that the user
# who is making this request has permission to make the request.