mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 20:44:04 +00:00
billing: Wrap make_end_of_cycle_updates_if_needed with transaction.atomic.
Otherwise, the plan would be left in an inconsistent state if one of the queries fail.
This commit is contained in:
@@ -204,6 +204,7 @@ def billing_home(request: HttpRequest) -> HttpResponse:
|
||||
if last_ledger_entry is not None:
|
||||
if new_plan is not None: # nocoverage
|
||||
plan = new_plan
|
||||
assert(plan is not None) # for mypy
|
||||
plan_name = {
|
||||
CustomerPlan.STANDARD: 'Zulip Standard',
|
||||
CustomerPlan.PLUS: 'Zulip Plus',
|
||||
|
||||
Reference in New Issue
Block a user