From ebdfb5081cbcf1305f7c38ed783a4443f29e1dd1 Mon Sep 17 00:00:00 2001 From: crazywoola <100913391+crazywoola@users.noreply.github.com> Date: Sat, 10 May 2025 18:56:45 +0800 Subject: [PATCH] Update api/services/account_service.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- api/services/account_service.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/api/services/account_service.py b/api/services/account_service.py index da03da69e9..4f186d30a9 100644 --- a/api/services/account_service.py +++ b/api/services/account_service.py @@ -672,7 +672,11 @@ class TenantService: if not tenant: raise TenantNotFoundError("Tenant not found.") - ta = db.session.query(TenantAccountJoin).filter_by(tenant_id=tenant.id, account_id=account.id).first() + ta = ( + db.session.query(TenantAccountJoin) + .filter_by(tenant_id=tenant.id, account_id=account.id) + .first() + ) if ta: tenant.role = ta.role else: