Commit e6388987 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

same as r34695 (do not raise IndexError if an empty list is saved as a recorded property).


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34696 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a29ed0dc
...@@ -510,7 +510,10 @@ class Rule(Predicate, XMLObject): ...@@ -510,7 +510,10 @@ class Rule(Predicate, XMLObject):
if movement.isPropertyRecorded(k): if movement.isPropertyRecorded(k):
movement_value = movement.getRecordedProperty(k) movement_value = movement.getRecordedProperty(k)
if isinstance(movement_value, list) and not isinstance(v, list): if isinstance(movement_value, list) and not isinstance(v, list):
try:
movement_value = movement_value[0] movement_value = movement_value[0]
except IndexError:
movement_value = None
else: else:
movement_value = movement.getProperty(k) movement_value = movement.getProperty(k)
if v != movement_value: if v != movement_value:
......
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