fix filter_bys

This commit is contained in:
Kenneth Kehl
2024-12-19 11:10:03 -08:00
parent 659169366c
commit 3388371428
35 changed files with 245 additions and 140 deletions

View File

@@ -43,7 +43,7 @@ def get_model_api_keys(service_id, id=None):
select(ApiKey).where(
ApiKey.id == id,
ApiKey.service_id == service_id,
ApiKey.expiry_date == None, # noqa
ApiKey.expiry_date == None, # noqa
)
)
.scalars()
@@ -88,7 +88,9 @@ def get_unsigned_secret(key_id):
"""
api_key = (
db.session.execute(
select(ApiKey).where(ApiKey.id == key_id, ApiKey.expiry_date == None) # noqa
select(ApiKey).where(
ApiKey.id == key_id, ApiKey.expiry_date == None # noqa
)
)
.scalars()
.one()