Return emtpty string when plan is not set

This commit is contained in:
PCoder 2020-12-01 17:12:55 +05:30
parent 52362cd0ea
commit e8b79d6951

View file

@ -114,7 +114,7 @@ def get_line_item_from_stripe_invoice(invoice):
plan_name = ""
for line_data in invoice["lines"]["data"]:
if is_first:
plan_name = line_data.plan.name
plan_name = line_data.plan.name if line_data.plan is not None else ""
start_date = line_data.period.start
end_date = line_data.period.end
is_first = False