Correct error in getting lines data count
This commit is contained in:
parent
3eaa53ca78
commit
033db01810
1 changed files with 1 additions and 1 deletions
|
@ -151,7 +151,7 @@ class StripeUtils(object):
|
|||
'total': invoice.total,
|
||||
# to see how many line items we have in this invoice and
|
||||
# then later check if we have more than 1
|
||||
'lines_data_count': len(invoice.lines.data),
|
||||
'lines_data_count': len(invoice.lines.data) if invoice.lines.data is not None else 0,
|
||||
'invoice_id': invoice.id,
|
||||
'lines_meta_data_csv': ','.join(
|
||||
[line.metadata.VM_ID if line.metadata.VM_ID is not None else '' for line in invoice.lines.data]
|
||||
|
|
Loading…
Reference in a new issue