Commit d9f65a65 authored by Nicolas Dumazet's avatar Nicolas Dumazet

Fix an error of testLegacyProductionOrder.

When a Transformed Resource is not properly configured, getAggregatedAmountList
can raise a KeyError, which will abort transformation interaction activities.
It's okay to skip the line, really: it's just misconfigured.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33446 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent db99e5a0
......@@ -303,7 +303,13 @@ class Transformation(XMLObject, Predicate, Variated):
# Browse each transformed or assorted resource of the current
# transformation
if line_is_included(transformation_line):
result.extend(transformation_line.getAggregatedAmountList(context))
try:
result.extend(transformation_line.getAggregatedAmountList(context))
except KeyError:
# KeyError is raised by TransformedResource.getAggregatedAmountList
# in case of misconfiguration of a Cell.
# Just ignore the line
pass
if context_quantity:
result.multiplyQuantity(context=context)
......
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