mirror of https://github.com/zulip/zulip.git
support: Skip corporate import unless BILLING_ENABLED.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
4b8556ed13
commit
59174694af
|
@ -17,7 +17,6 @@ from django.utils.translation import gettext as _
|
||||||
|
|
||||||
from confirmation.models import Confirmation, confirmation_url
|
from confirmation.models import Confirmation, confirmation_url
|
||||||
from confirmation.settings import STATUS_ACTIVE
|
from confirmation.settings import STATUS_ACTIVE
|
||||||
from corporate.models import Customer, CustomerPlan
|
|
||||||
from zerver.actions.create_realm import do_change_realm_subdomain
|
from zerver.actions.create_realm import do_change_realm_subdomain
|
||||||
from zerver.actions.realm_settings import (
|
from zerver.actions.realm_settings import (
|
||||||
do_change_realm_org_type,
|
do_change_realm_org_type,
|
||||||
|
@ -56,7 +55,12 @@ if settings.BILLING_ENABLED:
|
||||||
update_sponsorship_status,
|
update_sponsorship_status,
|
||||||
void_all_open_invoices,
|
void_all_open_invoices,
|
||||||
)
|
)
|
||||||
from corporate.models import get_current_plan_by_realm, get_customer_by_realm
|
from corporate.models import (
|
||||||
|
Customer,
|
||||||
|
CustomerPlan,
|
||||||
|
get_current_plan_by_realm,
|
||||||
|
get_customer_by_realm,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def get_plan_name(plan_type: int) -> str:
|
def get_plan_name(plan_type: int) -> str:
|
||||||
|
@ -133,8 +137,8 @@ VALID_BILLING_METHODS = [
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class PlanData:
|
class PlanData:
|
||||||
customer: Optional[Customer] = None
|
customer: Optional["Customer"] = None
|
||||||
current_plan: Optional[CustomerPlan] = None
|
current_plan: Optional["CustomerPlan"] = None
|
||||||
licenses: Optional[int] = None
|
licenses: Optional[int] = None
|
||||||
licenses_used: Optional[int] = None
|
licenses_used: Optional[int] = None
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue