fix: ensure list has items

This commit is contained in:
Sagar Vora
2024-11-06 14:04:30 +05:30
parent c62596b323
commit e13e688987

View File

@@ -439,7 +439,7 @@ def split_invoices(invoices):
continue
return_against_is_added = any(
d for d in _invoices if d[0].pos_invoice == pos_invoice.return_against
d for d in _invoices if d and d[0].pos_invoice == pos_invoice.return_against
)
if return_against_is_added:
break