Commit 7a07c1fe authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_erp5: Fix up condition

   Fix up don't create line if line is found.
parent 225bf137
......@@ -48,9 +48,9 @@ if cloud_invitation.getMaximumInvoiceDelay(0) > contract.getMaximumInvoiceDelay(
for invitation_line in cloud_invitation.objectValues():
has_line = False
for line in contract.objectValues():
if line.getPriceCurrency() == invitation_line.getPriceCurrency() and \
invitation_line.getMaximumInvoiceCredit(0) > line.getMaximumInvoiceCredit(0):
line.edit(
if line.getPriceCurrency() == invitation_line.getPriceCurrency():
if invitation_line.getMaximumInvoiceCredit(0) > line.getMaximumInvoiceCredit(0):
line.edit(
maximum_invoice_credit=invitation_line.getMaximumInvoiceCredit())
has_line = True
break
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment