From ef1b3a406799e46e400c322671f58b3b5007798f Mon Sep 17 00:00:00 2001 From: Vishnu KS Date: Fri, 9 Apr 2021 16:01:07 +0530 Subject: [PATCH] corporate: Create VALID_BILLING_MODALITY_VALUES in views.py. --- corporate/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/corporate/views.py b/corporate/views.py index 92a6aedd61..1f9cd911d6 100644 --- a/corporate/views.py +++ b/corporate/views.py @@ -51,6 +51,7 @@ from zerver.models import UserProfile, get_realm billing_logger = logging.getLogger("corporate.stripe") +VALID_BILLING_MODALITY_VALUES = ["send_invoice", "charge_automatically"] VALID_LICENSE_MANAGEMENT_VALUES = ["automatic", "manual"] @@ -69,7 +70,7 @@ def check_upgrade_parameters( has_stripe_token: bool, seat_count: int, ) -> None: - if billing_modality not in ["send_invoice", "charge_automatically"]: + if billing_modality not in VALID_BILLING_MODALITY_VALUES: raise BillingError("unknown billing_modality") if schedule not in ["annual", "monthly"]: raise BillingError("unknown schedule")