Changed db queries to use one, which throws NoResultFound exception, this exception is dealt with in our error handlers.

Now a lot of the if none checks can be removed.
This commit is contained in:
Rebecca Law
2016-03-11 12:39:55 +00:00
parent 209244ff19
commit e055590b07
19 changed files with 66 additions and 112 deletions

View File

@@ -8,7 +8,7 @@ def dao_fetch_all_services():
def dao_fetch_service_by_id(service_id):
return Service.query.filter_by(id=service_id).first()
return Service.query.filter_by(id=service_id).one()
def dao_fetch_all_services_by_user(user_id):