Handle if VM_ID metadata is not set
This commit is contained in:
parent
dbf3b92c06
commit
66ffbf38aa
1 changed files with 1 additions and 1 deletions
|
@ -154,7 +154,7 @@ class StripeUtils(object):
|
|||
'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]
|
||||
[line.metadata.VM_ID if hasattr(line.metadata, 'VM_ID') else '' for line in invoice.lines.data]
|
||||
)
|
||||
}
|
||||
starting_after = invoice.id
|
||||
|
|
Loading…
Reference in a new issue