diff --git a/src/backend/app/db/models.py b/src/backend/app/db/models.py index bfd1e2796..bb9aab597 100644 --- a/src/backend/app/db/models.py +++ b/src/backend/app/db/models.py @@ -301,6 +301,7 @@ async def one(cls, db: Connection, org_identifier: int | str) -> Self: """, {"org_identifier": org_identifier.lower()}, ) + db_org = await cur.fetchone() else: await cur.execute( """ @@ -309,7 +310,6 @@ async def one(cls, db: Connection, org_identifier: int | str) -> Self: """, {"org_identifier": org_identifier}, ) - db_org = await cur.fetchone() if db_org is None: