Commit b95a45b1 authored by Arnaud Fontaine's avatar Arnaud Fontaine

Allow giving suppress_events to _setObject when importing an object from a file



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@40256 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1d5da2b4
......@@ -15,7 +15,8 @@
# Import: add rename feature and make _importObjectFromFile return the object
from OFS.ObjectManager import ObjectManager, customImporters
def ObjectManager_importObjectFromFile(self, filepath, verify=1, set_owner=1, id=None):
def ObjectManager_importObjectFromFile(self, filepath, verify=1, set_owner=1,
id=None, suppress_events=False):
#LOG('_importObjectFromFile, filepath',0,filepath)
# locate a valid connection
connection=self._p_jar
......@@ -30,7 +31,8 @@ def ObjectManager_importObjectFromFile(self, filepath, verify=1, set_owner=1, id
if id is None:
id=ob.id
if hasattr(id, 'im_func'): id=id()
self._setObject(id, ob, set_owner=set_owner)
self._setObject(id, ob, set_owner=set_owner,
suppress_events=suppress_events)
# try to make ownership implicit if possible in the context
# that the object was imported into.
......
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