mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-24 01:11:38 -05:00
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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user