Commit 7a140455 authored by Vincent Pelletier's avatar Vincent Pelletier

BusinessTemplate,TrashTool: Do not trigger (un)indexation when preserving/trimming subobjects.

parent 9af75b60
......@@ -1487,7 +1487,7 @@ class ObjectTemplateItem(BaseTemplateItem):
if obj._getOb(subobject_id, None) is None:
subobject_data.seek(0)
subobject = connection.importFile(subobject_data)
obj._setObject(subobject_id, subobject)
obj._setObject(subobject_id, subobject, suppress_events=True)
except AttributeError:
# XXX this may happen when an object which can contain
# sub-objects (e.g. ERP5 Form) has been replaced with
......
......@@ -151,7 +151,7 @@ class TrashTool(BaseTool):
subobject._p_oid, StringIO())
if save: # remove subobjecs from backup object
obj._delObject(subobject_id)
obj._delObject(subobject_id, suppress_events=True)
if subobject_id in obj.objectIds():
LOG('Products.ERP5.Tool.TrashTool', WARNING,
'Cleaning corrupted BTreeFolder2 object at %r.' % \
......
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