From 8d3b00b7e98aeedb4db27705e0548e41ec196991 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Fri, 16 Feb 2007 16:12:24 +0000 Subject: [PATCH] don't set and uid if not present on the object git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12824 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/Document/BusinessTemplate.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/product/ERP5/Document/BusinessTemplate.py b/product/ERP5/Document/BusinessTemplate.py index ce281a5668..03ba846c15 100644 --- a/product/ERP5/Document/BusinessTemplate.py +++ b/product/ERP5/Document/BusinessTemplate.py @@ -121,7 +121,8 @@ def _recursiveRemoveUid(obj): This is used to prevent unindexing real objects when we delete subobjects on a copy of this object. """ - obj.uid = None + if hasattr(aq_base(obj), 'uid'): + obj.uid = None for subobj in obj.objectValues(): _recursiveRemoveUid(subobj) -- 2.30.9