From e59f035848b122b00a4d451565fbecbcbf888adf Mon Sep 17 00:00:00 2001 From: spwoodcock Date: Thu, 24 Oct 2024 01:34:59 +0100 Subject: [PATCH] fix: case where string is passed to dborg one func --- src/backend/app/db/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: