Commit 18b3066f authored by Julien Muchembled's avatar Julien Muchembled

Do not use hasattr to test a persistent object

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38634 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ee1a4d70
......@@ -144,7 +144,7 @@ def _recursiveRemoveUid(obj):
This is used to prevent unindexing real objects when we delete subobjects on
a copy of this object.
"""
if hasattr(aq_base(obj), 'uid'):
if getattr(aq_base(obj), 'uid', _MARKER) is not _MARKER:
obj.uid = None
for subobj in obj.objectValues():
_recursiveRemoveUid(subobj)
......
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