bug fix: inspecting amount while looking for free plan

legacy
Gogs 4 years ago
parent 5a201bddf7
commit 53a0725cbc

@ -155,7 +155,7 @@ class User :
# self.user_plan = []
# self.customer = {}
customer = stripe.customer.Customer.list(email=email).to_dict_recursive()['data']
free_plan = [item for item in self.plans if item['amount'] == 0]
free_plan = [item for item in self.plans if 'amount' in item and item['amount'] == 0]
if customer :
customer = customer[0]
else:

Loading…
Cancel
Save