Skip to content

Commit 93fd027

Browse files
committed
add subscription_change context to quota update when changing plan
1 parent b8ca5d6 commit 93fd027

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

backend/btrixcloud/orgs.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -558,9 +558,15 @@ async def update_subscription_data(
558558

559559
org = Organization.from_dict(org_data)
560560
if update.quotas:
561-
# don't change gifted minutes here
561+
# don't change gifted or extra minutes here
562562
update.quotas.giftedExecMinutes = None
563-
await self.update_quotas(org, update.quotas)
563+
update.quotas.extraExecMinutes = None
564+
await self.update_quotas(
565+
org,
566+
update.quotas,
567+
mode="set",
568+
context=f"subscription_change:{update.planId}",
569+
)
564570

565571
return org
566572

0 commit comments

Comments
 (0)