Handle None when all stripe plans are empty

This commit is contained in:
PCoder 2019-09-14 23:13:30 +05:30
parent 44a68f88d8
commit 9b8a9c563a
1 changed files with 5 additions and 4 deletions

View File

@ -267,6 +267,7 @@ class StripeUtils(object):
def _get_all_stripe_plans(self):
all_stripe_plans = client.get("/v1/stripe_plans")
all_stripe_plans_set = set()
if all_stripe_plans:
all_stripe_plans_obj = json.loads(all_stripe_plans.value)
if (all_stripe_plans_obj and
len(all_stripe_plans_obj['plans']) > 0):