Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

corporate: Create VALID_LICENSE_MANAGEMENT_VALUES in views.py.

Vishnu KS6db6fab5ff5a
diff --git a/corporate/views.py b/corporate/views.py
index e727dcfcca3..92a6aedd611 100644
--- a/corporate/views.py
+++ b/corporate/views.py
@@ -51,6 +51,8 @@ from zerver.models import UserProfile, get_realm
billing_logger = logging.getLogger("corporate.stripe")
+VALID_LICENSE_MANAGEMENT_VALUES = ["automatic", "manual"]
+
def unsign_seat_count(signed_seat_count: str, salt: str) -> int:
try:
@@ -71,7 +73,7 @@ def check_upgrade_parameters(
raise BillingError("unknown billing_modality")
if schedule not in ["annual", "monthly"]:
raise BillingError("unknown schedule")
- if license_management not in ["automatic", "manual"]:
+ if license_management not in VALID_LICENSE_MANAGEMENT_VALUES:
raise BillingError("unknown license_management")
if billing_modality == "charge_automatically":