[Erp5-report] r20161 - /erp5/trunk/products/ERP5Type/Constraint/PropertyTypeValidity.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Mar 26 17:15:22 CET 2008


Author: jerome
Date: Wed Mar 26 17:15:08 2008
New Revision: 20161

URL: http://svn.erp5.org?rev=20161&view=rev
Log:
_local_properties is not always defined on Base instances

Modified:
    erp5/trunk/products/ERP5Type/Constraint/PropertyTypeValidity.py

Modified: erp5/trunk/products/ERP5Type/Constraint/PropertyTypeValidity.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Constraint/PropertyTypeValidity.py?rev=20161&r1=20160&r2=20161&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Constraint/PropertyTypeValidity.py (original)
+++ erp5/trunk/products/ERP5Type/Constraint/PropertyTypeValidity.py Wed Mar 26 17:15:08 2008
@@ -95,7 +95,8 @@
     # if this property was a local property and has been later added in a
     # property sheet, we want to remove it from _local_properties
       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:
         obj._local_properties = tuple([x for x in obj._local_properties
                                        if x['id'] != property_id])




More information about the Erp5-report mailing list