Commit fe04a3f2 authored by Łukasz Nowak's avatar Łukasz Nowak

- made code error resistant - sometimes found document do not have getSpecialiseValueList method


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28242 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d469ed83
......@@ -135,9 +135,13 @@ class TradeCondition(Path, Transformation, XMLMatrix):
portal_type=portal_type_list)
while len(specialise_value_list) != 0:
specialise = specialise_value_list.pop(0)
child_list = specialise.getSpecialiseValueList(\
portal_type=portal_type_list)
try:
child_list = specialise.getSpecialiseValueList(\
portal_type=portal_type_list)
except AttributeError:
# it is possible, that specialised object cannot be specialised
# anymore
continue
intersection = set(child_list).intersection(\
set(visited_trade_condition_list))
for model in child_list:
......
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