Commit 3d91efda authored by Aurel's avatar Aurel

prevent failure when property is None


git-svn-id: https://svn.erp5.org/repos/public/erp5/sandbox/amount_generator@36903 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 389d29d5
...@@ -43,7 +43,7 @@ class CategoryMovementGroup(PropertyMovementGroup): ...@@ -43,7 +43,7 @@ class CategoryMovementGroup(PropertyMovementGroup):
getProperty = getattr(movement, 'getMappedProperty', movement.getProperty) getProperty = getattr(movement, 'getMappedProperty', movement.getProperty)
for prop in self.getTestedPropertyList(): for prop in self.getTestedPropertyList():
list_prop = '%s_list' % prop list_prop = '%s_list' % prop
property_dict[list_prop] = sorted(getProperty(list_prop)) property_dict[list_prop] = sorted(getProperty(list_prop) or ())
return property_dict return property_dict
def test(self, document, property_dict, property_list=None, **kw): def test(self, document, property_dict, property_list=None, **kw):
......
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