Commit 4f15a1eb authored by Aurel's avatar Aurel

fix import of getBrain

parent 2d9c51e6
...@@ -1433,7 +1433,10 @@ class ObjectTemplateItem(BaseTemplateItem): ...@@ -1433,7 +1433,10 @@ class ObjectTemplateItem(BaseTemplateItem):
self.removeProperties(obj, 0) self.removeProperties(obj, 0)
__traceback_info__ = (container, object_id, obj) __traceback_info__ = (container, object_id, obj)
container._setObject(object_id, obj) container._setObject(object_id, obj)
obj = container._getOb(object_id) try:
obj = container._getOb(object_id)
except:
import ipdb; ipdb.set_trace()
if not object_existed: if not object_existed:
# A new object was added, call the hook # A new object was added, call the hook
......
...@@ -45,7 +45,10 @@ from Products.ZSQLCatalog.SQLCatalog import Query, ComplexQuery, SimpleQuery ...@@ -45,7 +45,10 @@ from Products.ZSQLCatalog.SQLCatalog import Query, ComplexQuery, SimpleQuery
from Shared.DC.ZRDB.Results import Results from Shared.DC.ZRDB.Results import Results
from Products.ERP5Type.Utils import mergeZRDBResults from Products.ERP5Type.Utils import mergeZRDBResults
from App.Extensions import getBrain try: # BBB Zope 2.12
from App.Extensions import getBrain
except ImportError:
from Shared.DC.ZRDB.DA import getBrain
from MySQLdb import ProgrammingError from MySQLdb import ProgrammingError
from MySQLdb.constants.ER import NO_SUCH_TABLE from MySQLdb.constants.ER import NO_SUCH_TABLE
......
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