From 77828ec40e59fab9727b9c48ddeb9913f2f48003 Mon Sep 17 00:00:00 2001 From: Ajay Singh Date: Fri, 31 Jan 2025 09:45:01 -0800 Subject: [PATCH 01/12] add pro plan --- .../migrations/0065_add_pro_plan.py | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 shared/django_apps/codecov_auth/migrations/0065_add_pro_plan.py diff --git a/shared/django_apps/codecov_auth/migrations/0065_add_pro_plan.py b/shared/django_apps/codecov_auth/migrations/0065_add_pro_plan.py new file mode 100644 index 00000000..8a5649a5 --- /dev/null +++ b/shared/django_apps/codecov_auth/migrations/0065_add_pro_plan.py @@ -0,0 +1,40 @@ +# Generated by Django 4.2.16 on 2025-01-31 09:35 + +from django.db import migrations + + +def add_pro_plan(apps, schema_editor): + Plan = apps.get_model("codecov_auth", "Plan") + Tier = apps.get_model("codecov_auth", "Tier") + + # Get the 'Pro' tier + pro_tier = Tier.objects.get(tier_name="Pro") + + # Create a new plan + Plan.objects.create( + tier=pro_tier, + base_unit_price=10, + benefits=[ + "Configurable # of users", + "Unlimited public repositories", + "Unlimited private repositories", + "Priority Support", + ], + billing_rate="annually", # Set the billing rate + is_active=True, + marketing_name="Pro", + max_seats=None, # Set the max seats + monthly_uploads_limit=None, # Set the monthly uploads limit + name="users-pr-inappy", + paid_plan=True, + ) + + +class Migration(migrations.Migration): + dependencies = [ + ("codecov_auth", "0064_plan_stripe_id"), + ] + + operations = [ + migrations.RunPython(add_pro_plan), + ] From 173fa6b6627a07283e9a6b22151fd673946845cb Mon Sep 17 00:00:00 2001 From: Ajay Singh Date: Fri, 31 Jan 2025 09:56:36 -0800 Subject: [PATCH 02/12] add tier as well since won't exist --- .../migrations/0065_add_pro_plan.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/shared/django_apps/codecov_auth/migrations/0065_add_pro_plan.py b/shared/django_apps/codecov_auth/migrations/0065_add_pro_plan.py index 8a5649a5..7cbe0d24 100644 --- a/shared/django_apps/codecov_auth/migrations/0065_add_pro_plan.py +++ b/shared/django_apps/codecov_auth/migrations/0065_add_pro_plan.py @@ -1,5 +1,3 @@ -# Generated by Django 4.2.16 on 2025-01-31 09:35 - from django.db import migrations @@ -7,10 +5,15 @@ def add_pro_plan(apps, schema_editor): Plan = apps.get_model("codecov_auth", "Plan") Tier = apps.get_model("codecov_auth", "Tier") - # Get the 'Pro' tier - pro_tier = Tier.objects.get(tier_name="Pro") + pro_tier = Tier.objects.create( + tier_name="pro", + bundle_analysis=True, + test_analytics=True, + flaky_test_detection=True, + project_coverage=True, + private_repo_support=True, + ) - # Create a new plan Plan.objects.create( tier=pro_tier, base_unit_price=10, @@ -20,11 +23,11 @@ def add_pro_plan(apps, schema_editor): "Unlimited private repositories", "Priority Support", ], - billing_rate="annually", # Set the billing rate + billing_rate="annually", is_active=True, marketing_name="Pro", - max_seats=None, # Set the max seats - monthly_uploads_limit=None, # Set the monthly uploads limit + max_seats=None, + monthly_uploads_limit=None, name="users-pr-inappy", paid_plan=True, ) From d2c7509ca05f827c62f3b71b2ecd017472d36746 Mon Sep 17 00:00:00 2001 From: Ajay Singh Date: Fri, 31 Jan 2025 10:05:27 -0800 Subject: [PATCH 03/12] add check for enterprise and update all owners --- .../codecov_auth/migrations/0065_add_pro_plan.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/shared/django_apps/codecov_auth/migrations/0065_add_pro_plan.py b/shared/django_apps/codecov_auth/migrations/0065_add_pro_plan.py index 7cbe0d24..3bb3301c 100644 --- a/shared/django_apps/codecov_auth/migrations/0065_add_pro_plan.py +++ b/shared/django_apps/codecov_auth/migrations/0065_add_pro_plan.py @@ -1,9 +1,15 @@ from django.db import migrations +from shared.django_apps.utils.config import RUN_ENV + def add_pro_plan(apps, schema_editor): + if RUN_ENV != "ENTERPRISE": + return + Plan = apps.get_model("codecov_auth", "Plan") Tier = apps.get_model("codecov_auth", "Tier") + Owner = apps.get_model("codecov_auth", "Owner") pro_tier = Tier.objects.create( tier_name="pro", @@ -32,6 +38,10 @@ def add_pro_plan(apps, schema_editor): paid_plan=True, ) + for owner in Owner.objects.all(): + owner.plan = "users-pr-inappy" + owner.save() + class Migration(migrations.Migration): dependencies = [ From 0bf4ca8a83ca0e5a38391a548a660cf4bafe602b Mon Sep 17 00:00:00 2001 From: Ajay Singh Date: Tue, 4 Feb 2025 09:41:19 -0800 Subject: [PATCH 04/12] add account plan updates --- .../django_apps/codecov_auth/migrations/0065_add_pro_plan.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/shared/django_apps/codecov_auth/migrations/0065_add_pro_plan.py b/shared/django_apps/codecov_auth/migrations/0065_add_pro_plan.py index 3bb3301c..78747b94 100644 --- a/shared/django_apps/codecov_auth/migrations/0065_add_pro_plan.py +++ b/shared/django_apps/codecov_auth/migrations/0065_add_pro_plan.py @@ -10,6 +10,7 @@ def add_pro_plan(apps, schema_editor): Plan = apps.get_model("codecov_auth", "Plan") Tier = apps.get_model("codecov_auth", "Tier") Owner = apps.get_model("codecov_auth", "Owner") + Account = apps.get_model("codecov_auth", "Account") pro_tier = Tier.objects.create( tier_name="pro", @@ -42,6 +43,10 @@ def add_pro_plan(apps, schema_editor): owner.plan = "users-pr-inappy" owner.save() + for account in Account.objects.all(): + account.plan = "users-pr-inappy" + account.save() + class Migration(migrations.Migration): dependencies = [ From 7fe51c27a5685c4b65ccb83fc46e1502886f9f9d Mon Sep 17 00:00:00 2001 From: Ajay Singh Date: Wed, 5 Feb 2025 13:50:23 -0800 Subject: [PATCH 05/12] testing with plan config var --- .../{0065_add_pro_plan.py => 0066_add_pro_plan.py} | 8 ++++---- shared/django_apps/dummy_settings.py | 2 ++ shared/plan/constants.py | 4 +++- 3 files changed, 9 insertions(+), 5 deletions(-) rename shared/django_apps/codecov_auth/migrations/{0065_add_pro_plan.py => 0066_add_pro_plan.py} (88%) diff --git a/shared/django_apps/codecov_auth/migrations/0065_add_pro_plan.py b/shared/django_apps/codecov_auth/migrations/0066_add_pro_plan.py similarity index 88% rename from shared/django_apps/codecov_auth/migrations/0065_add_pro_plan.py rename to shared/django_apps/codecov_auth/migrations/0066_add_pro_plan.py index 78747b94..a59a478d 100644 --- a/shared/django_apps/codecov_auth/migrations/0065_add_pro_plan.py +++ b/shared/django_apps/codecov_auth/migrations/0066_add_pro_plan.py @@ -4,7 +4,7 @@ def add_pro_plan(apps, schema_editor): - if RUN_ENV != "ENTERPRISE": + if RUN_ENV == "ENTERPRISE": return Plan = apps.get_model("codecov_auth", "Plan") @@ -12,7 +12,7 @@ def add_pro_plan(apps, schema_editor): Owner = apps.get_model("codecov_auth", "Owner") Account = apps.get_model("codecov_auth", "Account") - pro_tier = Tier.objects.create( + pro_tier, _ = Tier.objects.get_or_create( tier_name="pro", bundle_analysis=True, test_analytics=True, @@ -21,7 +21,7 @@ def add_pro_plan(apps, schema_editor): private_repo_support=True, ) - Plan.objects.create( + Plan.objects.get_or_create( tier=pro_tier, base_unit_price=10, benefits=[ @@ -50,7 +50,7 @@ def add_pro_plan(apps, schema_editor): class Migration(migrations.Migration): dependencies = [ - ("codecov_auth", "0064_plan_stripe_id"), + ("codecov_auth", "0065_alter_account_plan_alter_owner_plan"), ] operations = [ diff --git a/shared/django_apps/dummy_settings.py b/shared/django_apps/dummy_settings.py index a012310e..b7f5eaa1 100644 --- a/shared/django_apps/dummy_settings.py +++ b/shared/django_apps/dummy_settings.py @@ -70,6 +70,8 @@ # Needed as certain migrations refer to it SKIP_RISKY_MIGRATION_STEPS = get_config("migrations", "skip_risky_steps", default=False) # noqa: F405 +DEFAULT_PLAN_NAME = get_config("plan", "default_plan_name", default="users-developer") + TEST = True # Database diff --git a/shared/plan/constants.py b/shared/plan/constants.py index 1c928874..fd0376aa 100644 --- a/shared/plan/constants.py +++ b/shared/plan/constants.py @@ -2,6 +2,8 @@ from dataclasses import dataclass from typing import List, Optional +from django.conf import settings + class MonthlyUploadLimits(enum.Enum): CODECOV_FREE_PLAN = 250 @@ -23,7 +25,7 @@ class PlanMarketingName(enum.Enum): TEAM = "Team" -DEFAULT_FREE_PLAN = "users-developer" +DEFAULT_FREE_PLAN = settings.DEFAULT_PLAN_NAME class PlanName(enum.Enum): From 79818a5153e79345ca6487fd36fce72871adffd5 Mon Sep 17 00:00:00 2001 From: Ajay Singh Date: Wed, 5 Feb 2025 14:00:45 -0800 Subject: [PATCH 06/12] update settings, confirm UTs pass, run locally and confirm --- shared/django_apps/codecov_auth/migrations/0066_add_pro_plan.py | 2 +- shared/django_apps/dummy_settings.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/shared/django_apps/codecov_auth/migrations/0066_add_pro_plan.py b/shared/django_apps/codecov_auth/migrations/0066_add_pro_plan.py index a59a478d..33baf525 100644 --- a/shared/django_apps/codecov_auth/migrations/0066_add_pro_plan.py +++ b/shared/django_apps/codecov_auth/migrations/0066_add_pro_plan.py @@ -4,7 +4,7 @@ def add_pro_plan(apps, schema_editor): - if RUN_ENV == "ENTERPRISE": + if RUN_ENV != "ENTERPRISE": return Plan = apps.get_model("codecov_auth", "Plan") diff --git a/shared/django_apps/dummy_settings.py b/shared/django_apps/dummy_settings.py index b7f5eaa1..bbc0b2a5 100644 --- a/shared/django_apps/dummy_settings.py +++ b/shared/django_apps/dummy_settings.py @@ -70,7 +70,7 @@ # Needed as certain migrations refer to it SKIP_RISKY_MIGRATION_STEPS = get_config("migrations", "skip_risky_steps", default=False) # noqa: F405 -DEFAULT_PLAN_NAME = get_config("plan", "default_plan_name", default="users-developer") +DEFAULT_PLAN_NAME = get_config("setup", "default_plan_name", default="users-developer") TEST = True From deb1489a530f6abe3ec426b487e5fdddb118df37 Mon Sep 17 00:00:00 2001 From: Ajay Singh Date: Thu, 6 Feb 2025 10:36:38 -0800 Subject: [PATCH 07/12] add to shared since referenced in API/worker --- shared/django_apps/db_settings.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shared/django_apps/db_settings.py b/shared/django_apps/db_settings.py index 52b61b1f..b71e0ed3 100644 --- a/shared/django_apps/db_settings.py +++ b/shared/django_apps/db_settings.py @@ -26,6 +26,8 @@ "setup", "database", "read_replica_enabled", default=False ) +DEFAULT_PLAN_NAME = get_config("setup", "default_plan_name", default="users-developer") + db_read_url = get_config("services", "database_read_url") if db_read_url: db_conf = urlparse(db_read_url) From 3825d338228fac3887064bf1964b7c967a89797c Mon Sep 17 00:00:00 2001 From: Ajay Singh Date: Thu, 6 Feb 2025 13:45:05 -0800 Subject: [PATCH 08/12] change to single line --- .../codecov_auth/migrations/0066_add_pro_plan.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/shared/django_apps/codecov_auth/migrations/0066_add_pro_plan.py b/shared/django_apps/codecov_auth/migrations/0066_add_pro_plan.py index 33baf525..9f4211b5 100644 --- a/shared/django_apps/codecov_auth/migrations/0066_add_pro_plan.py +++ b/shared/django_apps/codecov_auth/migrations/0066_add_pro_plan.py @@ -39,13 +39,9 @@ def add_pro_plan(apps, schema_editor): paid_plan=True, ) - for owner in Owner.objects.all(): - owner.plan = "users-pr-inappy" - owner.save() + Owner.objects.all().update(plan="users-pr-inappy") - for account in Account.objects.all(): - account.plan = "users-pr-inappy" - account.save() + Account.objects.all().update(plan="users-pr-inappy") class Migration(migrations.Migration): From 3cddf1629531c8b1a86544942fbc1878d2cc0f00 Mon Sep 17 00:00:00 2001 From: Ajay Singh Date: Thu, 6 Feb 2025 14:53:15 -0800 Subject: [PATCH 09/12] use update or create, no ids --- .../migrations/0066_add_pro_plan.py | 41 +++++++++++-------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/shared/django_apps/codecov_auth/migrations/0066_add_pro_plan.py b/shared/django_apps/codecov_auth/migrations/0066_add_pro_plan.py index 9f4211b5..7aca7d27 100644 --- a/shared/django_apps/codecov_auth/migrations/0066_add_pro_plan.py +++ b/shared/django_apps/codecov_auth/migrations/0066_add_pro_plan.py @@ -4,7 +4,7 @@ def add_pro_plan(apps, schema_editor): - if RUN_ENV != "ENTERPRISE": + if RUN_ENV == "ENTERPRISE": return Plan = apps.get_model("codecov_auth", "Plan") @@ -12,31 +12,38 @@ def add_pro_plan(apps, schema_editor): Owner = apps.get_model("codecov_auth", "Owner") Account = apps.get_model("codecov_auth", "Account") - pro_tier, _ = Tier.objects.get_or_create( + defaults = { + "bundle_analysis": True, + "test_analytics": True, + "flaky_test_detection": True, + "project_coverage": True, + "private_repo_support": True, + } + pro_tier, _ = Tier.objects.update_or_create( tier_name="pro", - bundle_analysis=True, - test_analytics=True, - flaky_test_detection=True, - project_coverage=True, - private_repo_support=True, + defaults=defaults, ) - Plan.objects.get_or_create( - tier=pro_tier, - base_unit_price=10, - benefits=[ + plan_defaults = { + "tier": pro_tier, + "base_unit_price": 10, + "benefits": [ "Configurable # of users", "Unlimited public repositories", "Unlimited private repositories", "Priority Support", ], - billing_rate="annually", - is_active=True, - marketing_name="Pro", - max_seats=None, - monthly_uploads_limit=None, + "billing_rate": "annually", + "is_active": True, + "marketing_name": "Pro", + "max_seats": None, + "monthly_uploads_limit": None, + "paid_plan": True, + } + + Plan.objects.update_or_create( name="users-pr-inappy", - paid_plan=True, + defaults=plan_defaults, ) Owner.objects.all().update(plan="users-pr-inappy") From 3a903df998c85dc2de4e5026d8d7d5ebdb05f9f5 Mon Sep 17 00:00:00 2001 From: Ajay Singh Date: Thu, 6 Feb 2025 14:54:32 -0800 Subject: [PATCH 10/12] plan defaults --- shared/django_apps/codecov_auth/migrations/0066_add_pro_plan.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/django_apps/codecov_auth/migrations/0066_add_pro_plan.py b/shared/django_apps/codecov_auth/migrations/0066_add_pro_plan.py index 7aca7d27..df713c68 100644 --- a/shared/django_apps/codecov_auth/migrations/0066_add_pro_plan.py +++ b/shared/django_apps/codecov_auth/migrations/0066_add_pro_plan.py @@ -4,7 +4,7 @@ def add_pro_plan(apps, schema_editor): - if RUN_ENV == "ENTERPRISE": + if RUN_ENV != "ENTERPRISE": return Plan = apps.get_model("codecov_auth", "Plan") From 6efc5f0fc06b17ec7375969843aaa6774b08cb73 Mon Sep 17 00:00:00 2001 From: Ajay Singh Date: Fri, 7 Feb 2025 09:15:51 -0800 Subject: [PATCH 11/12] testing --- .../codecov_auth/migrations/0066_add_pro_plan.py | 13 ++++++------- shared/django_apps/db_settings.py | 3 ++- shared/django_apps/dummy_settings.py | 3 ++- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/shared/django_apps/codecov_auth/migrations/0066_add_pro_plan.py b/shared/django_apps/codecov_auth/migrations/0066_add_pro_plan.py index df713c68..5c42fb1b 100644 --- a/shared/django_apps/codecov_auth/migrations/0066_add_pro_plan.py +++ b/shared/django_apps/codecov_auth/migrations/0066_add_pro_plan.py @@ -1,11 +1,10 @@ +from django.conf import settings from django.db import migrations -from shared.django_apps.utils.config import RUN_ENV - def add_pro_plan(apps, schema_editor): - if RUN_ENV != "ENTERPRISE": - return + # if RUN_ENV == "ENTERPRISE": + # return Plan = apps.get_model("codecov_auth", "Plan") Tier = apps.get_model("codecov_auth", "Tier") @@ -42,13 +41,13 @@ def add_pro_plan(apps, schema_editor): } Plan.objects.update_or_create( - name="users-pr-inappy", + name=settings.DEFAULT_PLAN_NAME, defaults=plan_defaults, ) - Owner.objects.all().update(plan="users-pr-inappy") + Owner.objects.all().update(plan=settings.DEFAULT_PLAN_NAME) - Account.objects.all().update(plan="users-pr-inappy") + Account.objects.all().update(plan=settings.DEFAULT_PLAN_NAME) class Migration(migrations.Migration): diff --git a/shared/django_apps/db_settings.py b/shared/django_apps/db_settings.py index b71e0ed3..ce64038a 100644 --- a/shared/django_apps/db_settings.py +++ b/shared/django_apps/db_settings.py @@ -3,6 +3,7 @@ import django_prometheus from shared.config import get_config +from shared.django_apps.utils.config import RUN_ENV from shared.timeseries.helpers import is_timeseries_enabled db_url = get_config("services", "database_url") @@ -26,7 +27,7 @@ "setup", "database", "read_replica_enabled", default=False ) -DEFAULT_PLAN_NAME = get_config("setup", "default_plan_name", default="users-developer") +DEFAULT_PLAN_NAME = "users-pr-inappy" if RUN_ENV == "ENTERPRISE" else "users-developer" db_read_url = get_config("services", "database_read_url") if db_read_url: diff --git a/shared/django_apps/dummy_settings.py b/shared/django_apps/dummy_settings.py index bbc0b2a5..79533a27 100644 --- a/shared/django_apps/dummy_settings.py +++ b/shared/django_apps/dummy_settings.py @@ -1,6 +1,7 @@ from pathlib import Path from shared.django_apps.db_settings import * # noqa: F403 +from shared.django_apps.utils.config import RUN_ENV # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent @@ -70,7 +71,7 @@ # Needed as certain migrations refer to it SKIP_RISKY_MIGRATION_STEPS = get_config("migrations", "skip_risky_steps", default=False) # noqa: F405 -DEFAULT_PLAN_NAME = get_config("setup", "default_plan_name", default="users-developer") +DEFAULT_PLAN_NAME = "users-pr-inappy" if RUN_ENV == "ENTERPRISE" else "users-developer" TEST = True From c12d9bd4b539b1f9a6febb97368c0bb3f55c3f9f Mon Sep 17 00:00:00 2001 From: Ajay Singh Date: Fri, 7 Feb 2025 09:31:07 -0800 Subject: [PATCH 12/12] just use a single var instead of two, change back migration file --- .../codecov_auth/migrations/0066_add_pro_plan.py | 13 +++++++------ shared/django_apps/db_settings.py | 3 --- shared/django_apps/dummy_settings.py | 2 -- shared/plan/constants.py | 4 ++-- 4 files changed, 9 insertions(+), 13 deletions(-) diff --git a/shared/django_apps/codecov_auth/migrations/0066_add_pro_plan.py b/shared/django_apps/codecov_auth/migrations/0066_add_pro_plan.py index 5c42fb1b..df713c68 100644 --- a/shared/django_apps/codecov_auth/migrations/0066_add_pro_plan.py +++ b/shared/django_apps/codecov_auth/migrations/0066_add_pro_plan.py @@ -1,10 +1,11 @@ -from django.conf import settings from django.db import migrations +from shared.django_apps.utils.config import RUN_ENV + def add_pro_plan(apps, schema_editor): - # if RUN_ENV == "ENTERPRISE": - # return + if RUN_ENV != "ENTERPRISE": + return Plan = apps.get_model("codecov_auth", "Plan") Tier = apps.get_model("codecov_auth", "Tier") @@ -41,13 +42,13 @@ def add_pro_plan(apps, schema_editor): } Plan.objects.update_or_create( - name=settings.DEFAULT_PLAN_NAME, + name="users-pr-inappy", defaults=plan_defaults, ) - Owner.objects.all().update(plan=settings.DEFAULT_PLAN_NAME) + Owner.objects.all().update(plan="users-pr-inappy") - Account.objects.all().update(plan=settings.DEFAULT_PLAN_NAME) + Account.objects.all().update(plan="users-pr-inappy") class Migration(migrations.Migration): diff --git a/shared/django_apps/db_settings.py b/shared/django_apps/db_settings.py index ce64038a..52b61b1f 100644 --- a/shared/django_apps/db_settings.py +++ b/shared/django_apps/db_settings.py @@ -3,7 +3,6 @@ import django_prometheus from shared.config import get_config -from shared.django_apps.utils.config import RUN_ENV from shared.timeseries.helpers import is_timeseries_enabled db_url = get_config("services", "database_url") @@ -27,8 +26,6 @@ "setup", "database", "read_replica_enabled", default=False ) -DEFAULT_PLAN_NAME = "users-pr-inappy" if RUN_ENV == "ENTERPRISE" else "users-developer" - db_read_url = get_config("services", "database_read_url") if db_read_url: db_conf = urlparse(db_read_url) diff --git a/shared/django_apps/dummy_settings.py b/shared/django_apps/dummy_settings.py index 79533a27..fba6b1a0 100644 --- a/shared/django_apps/dummy_settings.py +++ b/shared/django_apps/dummy_settings.py @@ -1,7 +1,6 @@ from pathlib import Path from shared.django_apps.db_settings import * # noqa: F403 -from shared.django_apps.utils.config import RUN_ENV # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent @@ -71,7 +70,6 @@ # Needed as certain migrations refer to it SKIP_RISKY_MIGRATION_STEPS = get_config("migrations", "skip_risky_steps", default=False) # noqa: F405 -DEFAULT_PLAN_NAME = "users-pr-inappy" if RUN_ENV == "ENTERPRISE" else "users-developer" TEST = True diff --git a/shared/plan/constants.py b/shared/plan/constants.py index fd0376aa..25b354d5 100644 --- a/shared/plan/constants.py +++ b/shared/plan/constants.py @@ -2,7 +2,7 @@ from dataclasses import dataclass from typing import List, Optional -from django.conf import settings +from shared.django_apps.utils.config import RUN_ENV class MonthlyUploadLimits(enum.Enum): @@ -25,7 +25,7 @@ class PlanMarketingName(enum.Enum): TEAM = "Team" -DEFAULT_FREE_PLAN = settings.DEFAULT_PLAN_NAME +DEFAULT_FREE_PLAN = "users-pr-inappy" if RUN_ENV == "ENTERPRISE" else "users-developer" class PlanName(enum.Enum):