Commit 1e996746 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

modify not to raise KeyError if the specified key is missing.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34162 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 55c38170
......@@ -207,7 +207,7 @@ class InvoiceTransactionRuleMovementGenerator(MovementGeneratorMixin):
exchange_ratio = None
precision = None
try:
section = prevision_line[arrow][0]
section = prevision_line.get(arrow, [])[0]
except IndexError:
section = None
if section is not None:
......
79
\ No newline at end of file
80
\ No newline at end of file
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