do_change_plan_type: Mark the transaction to not create savepoints.

This commit adds 'savepoint=False' to the transaction.atomic
decorators of do_change_plan_type as we don't intend to create
savepoints when the function is called inside an outer transaction.
This commit is contained in:
Prakhar Pratyush 2024-11-01 21:46:32 +05:30 committed by Tim Abbott
parent c4f74f470d
commit f351f94827
1 changed files with 3 additions and 2 deletions

View File

@ -4006,6 +4006,7 @@ class RealmBillingSession(BillingSession):
return customer
@override
@transaction.atomic(savepoint=False)
def do_change_plan_type(
self, *, tier: int | None, is_sponsored: bool = False, background_update: bool = False
) -> None:
@ -4404,7 +4405,7 @@ class RemoteRealmBillingSession(BillingSession):
return customer
@override
@transaction.atomic
@transaction.atomic(savepoint=False)
def do_change_plan_type(
self, *, tier: int | None, is_sponsored: bool = False, background_update: bool = False
) -> None: # nocoverage
@ -4841,7 +4842,7 @@ class RemoteServerBillingSession(BillingSession):
return customer
@override
@transaction.atomic
@transaction.atomic(savepoint=False)
def do_change_plan_type(
self, *, tier: int | None, is_sponsored: bool = False, background_update: bool = False
) -> None: