diff --git a/api/services/account_service.py b/api/services/account_service.py index 17999c9e25..e35d325ae4 100644 --- a/api/services/account_service.py +++ b/api/services/account_service.py @@ -282,9 +282,9 @@ class TenantService: else: TenantAccountJoin.query.filter(TenantAccountJoin.account_id == account.id, TenantAccountJoin.tenant_id != tenant_id).update({'current': False}) tenant_account_join.current = True - db.session.commit() # Set the current tenant for the account account.current_tenant_id = tenant_account_join.tenant_id + db.session.commit() @staticmethod def get_tenant_members(tenant: Tenant) -> list[Account]: