Commit 86e7bb89 authored by Jérome Perrin's avatar Jérome Perrin

_local_properties is not always defined on Base instances


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20161 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4dd90e62
...@@ -95,7 +95,8 @@ class PropertyTypeValidity(Constraint): ...@@ -95,7 +95,8 @@ class PropertyTypeValidity(Constraint):
# if this property was a local property and has been later added in a # if this property was a local property and has been later added in a
# property sheet, we want to remove it from _local_properties # property sheet, we want to remove it from _local_properties
if fixit and \ if fixit and \
property_id in [x['id'] for x in obj._local_properties] and \ property_id in [x['id'] for x in
getattr(obj, '_local_properties', ())] and \
len([x for x in obj._propertyMap() if x['id'] == property_id]) > 1: len([x for x in obj._propertyMap() if x['id'] == property_id]) > 1:
obj._local_properties = tuple([x for x in obj._local_properties obj._local_properties = tuple([x for x in obj._local_properties
if x['id'] != property_id]) if x['id'] != property_id])
......
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