mirror of https://github.com/zulip/zulip.git
corporate: Create VALID_LICENSE_MANAGEMENT_VALUES in views.py.
This commit is contained in:
parent
98ec84eae2
commit
6db6fab5ff
|
@ -51,6 +51,8 @@ from zerver.models import UserProfile, get_realm
|
||||||
|
|
||||||
billing_logger = logging.getLogger("corporate.stripe")
|
billing_logger = logging.getLogger("corporate.stripe")
|
||||||
|
|
||||||
|
VALID_LICENSE_MANAGEMENT_VALUES = ["automatic", "manual"]
|
||||||
|
|
||||||
|
|
||||||
def unsign_seat_count(signed_seat_count: str, salt: str) -> int:
|
def unsign_seat_count(signed_seat_count: str, salt: str) -> int:
|
||||||
try:
|
try:
|
||||||
|
@ -71,7 +73,7 @@ def check_upgrade_parameters(
|
||||||
raise BillingError("unknown billing_modality")
|
raise BillingError("unknown billing_modality")
|
||||||
if schedule not in ["annual", "monthly"]:
|
if schedule not in ["annual", "monthly"]:
|
||||||
raise BillingError("unknown schedule")
|
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")
|
raise BillingError("unknown license_management")
|
||||||
|
|
||||||
if billing_modality == "charge_automatically":
|
if billing_modality == "charge_automatically":
|
||||||
|
|
Loading…
Reference in New Issue