Update api/services/account_service.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
pull/19482/head
crazywoola 1 year ago committed by GitHub
parent c3f4721c24
commit ebdfb5081c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -672,7 +672,11 @@ class TenantService:
if not tenant: if not tenant:
raise TenantNotFoundError("Tenant not found.") 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: if ta:
tenant.role = ta.role tenant.role = ta.role
else: else:

Loading…
Cancel
Save