Commit 0a04a94e authored by Julien Muchembled's avatar Julien Muchembled

Fix test_167_InstanceAndRelatedClassDefinedInSameBT

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38768 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 38df13a1
...@@ -3363,8 +3363,7 @@ class DocumentTemplateItem(BaseTemplateItem): ...@@ -3363,8 +3363,7 @@ class DocumentTemplateItem(BaseTemplateItem):
raise raise
continue continue
if self.local_file_importer_name is not None: if self.local_file_importer_name is not None:
self.local_file_importer_name(name) # before any import, flush all ZODB caches to force a DB reload
# after any import, flush all ZODB caches to force a DB reload
# otherwise we could have objects trying to get commited while # otherwise we could have objects trying to get commited while
# holding reference to a class that is no longer the same one as # holding reference to a class that is no longer the same one as
# the class in its import location and pickle doesn't tolerate it. # the class in its import location and pickle doesn't tolerate it.
...@@ -3375,6 +3374,7 @@ class DocumentTemplateItem(BaseTemplateItem): ...@@ -3375,6 +3374,7 @@ class DocumentTemplateItem(BaseTemplateItem):
# connection # connection
self.getPortalObject()._p_jar.db().cacheMinimize() self.getPortalObject()._p_jar.db().cacheMinimize()
gc.collect() gc.collect()
self.local_file_importer_name(name)
else: else:
BaseTemplateItem.install(self, context, trashbin, **kw) BaseTemplateItem.install(self, context, trashbin, **kw)
for id in self._archive.keys(): for id in self._archive.keys():
......
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