fix: remove billing cache when add or delete app or member (#25885)
This commit is contained in:
parent
b5a7e64e19
commit
7dadb33003
3 changed files with 17 additions and 0 deletions
|
|
@ -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"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue