Commit 82b7662b authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

a bit optimisation.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33310 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 288bf89e
......@@ -52,8 +52,9 @@ class CategoryMovementGroup(PropertyMovementGroup):
if x in property_list]
else:
target_property_list = self.getTestedPropertyList()
getProperty = document.getProperty
for prop in target_property_list:
if property_dict['%s_list' % prop] != \
sorted(document.getPropertyList(prop, None)):
list_prop = '%s_list' % prop
if property_dict[list_prop] != sorted(getProperty(list_prop)):
return False, property_dict
return True, property_dict
......@@ -51,7 +51,8 @@ class PropertyMovementGroup(MovementGroup):
if x in property_list]
else:
target_property_list = self.getTestedPropertyList()
getProperty = document.getProperty
for prop in target_property_list:
if property_dict[prop] != document.getProperty(prop, None):
if property_dict[prop] != getProperty(prop):
return False, property_dict
return True, property_dict
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