diff --git a/hc/payments/models.py b/hc/payments/models.py index c1aa668d..e7f068ce 100644 --- a/hc/payments/models.py +++ b/hc/payments/models.py @@ -167,6 +167,7 @@ class Subscription(models.Model): self.subscription_id = "" self.plan_id = "" + self.plan_name = "" self.save() def pm_is_card(self): diff --git a/hc/payments/tests/test_set_plan.py b/hc/payments/tests/test_set_plan.py index 9044609d..c9529ede 100644 --- a/hc/payments/tests/test_set_plan.py +++ b/hc/payments/tests/test_set_plan.py @@ -108,6 +108,7 @@ class SetPlanTestCase(BaseTestCase): self.sub = Subscription(user=self.alice) self.sub.subscription_id = "test-id" self.sub.plan_id = "P20" + self.sub.plan_name = "Business ($20/mo)" self.sub.save() self.profile.sms_limit = 1 @@ -121,6 +122,7 @@ class SetPlanTestCase(BaseTestCase): sub = Subscription.objects.get(user=self.alice) self.assertEqual(sub.subscription_id, "") self.assertEqual(sub.plan_id, "") + self.assertEqual(sub.plan_name, "") # User's profile should have standard limits self.profile.refresh_from_db() diff --git a/templates/accounts/billing.html b/templates/accounts/billing.html index 83da3d0e..fa026f72 100644 --- a/templates/accounts/billing.html +++ b/templates/accounts/billing.html @@ -42,13 +42,7 @@
Current Plan | -- {% if sub is None or sub.plan_id == "" %} - Free - {% else %} - {{ sub.plan_name }} - {% endif %} - | +{{ sub.plan_name|default:"Hobbyist" }} |