From 60ae45c4355efdfdf50246d3543274450f39ccf9 Mon Sep 17 00:00:00 2001 From: neatguycoding <15627489+NeatGuyCoding@users.noreply.github.com> Date: Sun, 13 Jul 2025 15:30:01 +0800 Subject: [PATCH] minor fix: fix dissolve tenant check permission always failed --- api/services/account_service.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/services/account_service.py b/api/services/account_service.py index 2ba6f4345b..bf516511bf 100644 --- a/api/services/account_service.py +++ b/api/services/account_service.py @@ -853,8 +853,8 @@ class TenantService: @staticmethod def dissolve_tenant(tenant: Tenant, operator: Account) -> None: """Dissolve tenant""" - if not TenantService.check_member_permission(tenant, operator, operator, "remove"): - raise NoPermissionError("No permission to dissolve tenant.") + TenantService.check_member_permission(tenant, operator, None, "remove") + db.session.query(TenantAccountJoin).filter_by(tenant_id=tenant.id).delete() db.session.delete(tenant) db.session.commit()