mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 23:55:58 -05:00
Return empty list when there are no users for the service.
Added a test for when there are no users for the service. Added a test_url_for - do we want to add this test and use url_for in our tests? Or explictly write the url in the test?
This commit is contained in:
@@ -161,7 +161,7 @@ def get_api_keys(service_id, key_id=None):
|
||||
def get_users_for_service(service_id):
|
||||
fetched = dao_fetch_service_by_id(service_id)
|
||||
if not fetched:
|
||||
return jsonify(result="error", message="Service not found"), 404
|
||||
print(fetched.users)
|
||||
return jsonify(data=[])
|
||||
|
||||
result = users_schema.dump(fetched.users)
|
||||
return jsonify(data=result.data)
|
||||
|
||||
Reference in New Issue
Block a user