Skip to content

Commit eec9a02

Browse files
committed
fix(api): fix incorrect query method
1 parent 86d6c8b commit eec9a02

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api/models/account.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def set_tenant_id(self, tenant_id: str):
151151
.where(TenantAccountJoin.account_id == self.id)
152152
)
153153
with Session(db.engine, expire_on_commit=False) as session:
154-
tenant_account_join = session.scalar(query)
154+
tenant_account_join = session.execute(query).first()
155155
if not tenant_account_join:
156156
return
157157
tenant, join = tenant_account_join

0 commit comments

Comments
 (0)