mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 06:53:25 +00:00
billing: Prevent setup_stripe from being run in production.
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
from zerver.lib.management import ZulipBaseCommand
|
|
||||||
from corporate.models import Plan, Coupon, Customer
|
from corporate.models import Plan, Coupon, Customer
|
||||||
|
from django.conf import settings
|
||||||
|
from zerver.lib.management import ZulipBaseCommand
|
||||||
from zproject.settings import get_secret
|
from zproject.settings import get_secret
|
||||||
|
|
||||||
from typing import Any
|
from typing import Any
|
||||||
@@ -11,6 +12,8 @@ class Command(ZulipBaseCommand):
|
|||||||
help = """Script to add the appropriate products and plans to Stripe."""
|
help = """Script to add the appropriate products and plans to Stripe."""
|
||||||
|
|
||||||
def handle(self, *args: Any, **options: Any) -> None:
|
def handle(self, *args: Any, **options: Any) -> None:
|
||||||
|
assert (settings.DEVELOPMENT or settings.TEST_SUITE)
|
||||||
|
|
||||||
Customer.objects.all().delete()
|
Customer.objects.all().delete()
|
||||||
Plan.objects.all().delete()
|
Plan.objects.all().delete()
|
||||||
Coupon.objects.all().delete()
|
Coupon.objects.all().delete()
|
||||||
|
|||||||
Reference in New Issue
Block a user