mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-30 04:11:42 -05:00
use unique()
This commit is contained in:
@@ -752,7 +752,7 @@ def dao_suspend_service(service_id):
|
||||
.options(joinedload(Service.api_keys))
|
||||
.filter(Service.id == service_id)
|
||||
)
|
||||
service = db.session.execute(stmt).one()
|
||||
service = db.session.execute(stmt).unique().one()
|
||||
|
||||
for api_key in service.api_keys:
|
||||
if not api_key.expiry_date:
|
||||
|
||||
Reference in New Issue
Block a user