From 86e7bb89d4ac0ab76f6275c6460a998a83033c36 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Wed, 26 Mar 2008 16:15:08 +0000
Subject: [PATCH] _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
---
 product/ERP5Type/Constraint/PropertyTypeValidity.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/product/ERP5Type/Constraint/PropertyTypeValidity.py b/product/ERP5Type/Constraint/PropertyTypeValidity.py
index ca0b0e9b68..031fdf8c24 100644
--- a/product/ERP5Type/Constraint/PropertyTypeValidity.py
+++ b/product/ERP5Type/Constraint/PropertyTypeValidity.py
@@ -95,7 +95,8 @@ class PropertyTypeValidity(Constraint):
     # 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])
-- 
2.30.9