From 94e5d684d92a948974d1dfd01b0ca1424b8e67a0 Mon Sep 17 00:00:00 2001 From: RulaKhaled Date: Fri, 20 Dec 2024 16:35:32 +0200 Subject: [PATCH] Update with value instead of keys for plan data dict --- shared/plan/constants.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/shared/plan/constants.py b/shared/plan/constants.py index 91a0b7fa..6823ef85 100644 --- a/shared/plan/constants.py +++ b/shared/plan/constants.py @@ -100,10 +100,11 @@ def convert_to_DTO(self) -> dict: "tier_name": self.tier_name, "monthly_uploads_limit": self.monthly_uploads_limit, "trial_days": self.trial_days, - "is_free_plan": self.tier_name == TierName.BASIC, - "is_pro_plan": self.tier_name == TierName.PRO, - "is_team_plan": self.tier_name == TierName.TEAM, - "is_enterprise_plan": self.tier_name == TierName.ENTERPRISE, + "is_free_plan": self.tier_name == TierName.BASIC.value, + "is_pro_plan": self.tier_name == TierName.PRO.value, + "is_team_plan": self.tier_name == TierName.TEAM.value, + "is_enterprise_plan": self.tier_name == TierName.ENTERPRISE.value, + "is_trial_plan": self.value == PlanName.TRIAL_PLAN_NAME.value, "is_sentry_plan": self.value in SENTRY_PAID_USER_PLAN_REPRESENTATIONS, }