Return emtpty string when plan is not set
This commit is contained in:
parent
52362cd0ea
commit
e8b79d6951
1 changed files with 1 additions and 1 deletions
|
@ -114,7 +114,7 @@ def get_line_item_from_stripe_invoice(invoice):
|
||||||
plan_name = ""
|
plan_name = ""
|
||||||
for line_data in invoice["lines"]["data"]:
|
for line_data in invoice["lines"]["data"]:
|
||||||
if is_first:
|
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
|
start_date = line_data.period.start
|
||||||
end_date = line_data.period.end
|
end_date = line_data.period.end
|
||||||
is_first = False
|
is_first = False
|
||||||
|
|
Loading…
Reference in a new issue