fix: remove billing cache when add or delete app or member (#25885)

This commit is contained in:
zyssyz123
2025-09-18 12:18:07 +08:00
committed by GitHub
parent b5a7e64e19
commit 7dadb33003
3 changed files with 17 additions and 0 deletions

View File

@@ -1041,6 +1041,8 @@ class TenantService:
db.session.add(ta)
db.session.commit()
if dify_config.BILLING_ENABLED:
BillingService.clean_billing_info_cache(tenant.id)
return ta
@staticmethod
@@ -1199,6 +1201,9 @@ class TenantService:
db.session.delete(ta)
db.session.commit()
if dify_config.BILLING_ENABLED:
BillingService.clean_billing_info_cache(tenant.id)
@staticmethod
def update_member_role(tenant: Tenant, member: Account, new_role: str, operator: Account):
"""Update member role"""