billing: downgrade_now -> downgrade_now_without_creating_additional_invoice.

This commit is contained in:
Vishnu KS
2020-08-13 13:52:58 +05:30
committed by Tim Abbott
parent 0c2d1f068d
commit 0d30f59c97
3 changed files with 8 additions and 5 deletions

View File

@@ -232,7 +232,10 @@ from zerver.models import (
from zerver.tornado.django_api import send_event
if settings.BILLING_ENABLED:
from corporate.lib.stripe import downgrade_now, update_license_ledger_if_needed
from corporate.lib.stripe import (
downgrade_now_without_creating_additional_invoices,
update_license_ledger_if_needed,
)
# This will be used to type annotate parameters in a function if the function
# works on both str and unicode in python 2 but in python 3 it only works on str.
@@ -813,7 +816,7 @@ def do_deactivate_realm(realm: Realm, acting_user: Optional[UserProfile]=None) -
realm.save(update_fields=["deactivated"])
if settings.BILLING_ENABLED:
downgrade_now(realm)
downgrade_now_without_creating_additional_invoices(realm)
event_time = timezone_now()
RealmAuditLog.objects.create(