Commit d6a25027 authored by Ayush Tiwari's avatar Ayush Tiwari

erp5_catalog: Revert back to monkeypatch getPath with getpath in ZSQLCatalog...

erp5_catalog: Revert back to monkeypatch getPath with getpath in ZSQLCatalog and solve inhertiance conflict for CatalogTool
parent 07c8cb99
...@@ -350,6 +350,7 @@ class CatalogTool (BaseTool, ZCatalog, CMFCoreCatalogTool): ...@@ -350,6 +350,7 @@ class CatalogTool (BaseTool, ZCatalog, CMFCoreCatalogTool):
# we use this function here to sometimes get objects to delete which if # we use this function here to sometimes get objects to delete which if
# not solved of inheritance conflict might lead to catalog deletion. # not solved of inheritance conflict might lead to catalog deletion.
getObject = ZCatalog.getObject getObject = ZCatalog.getObject
getPath = ZCatalog.getpath
def __init__(self): def __init__(self):
ZCatalog.__init__(self, self.getId()) ZCatalog.__init__(self, self.getId())
......
...@@ -940,8 +940,7 @@ class ZCatalog(OFSFolder, Persistent, Implicit): ...@@ -940,8 +940,7 @@ class ZCatalog(OFSFolder, Persistent, Implicit):
return record.path return record.path
else: else:
return None return None
# Use getPath from Base class while calling getPath on ZSQLCatalog getPath = getpath
getPath = Folder.getPath
security.declarePrivate('hasPath') security.declarePrivate('hasPath')
def hasPath(self, path, sql_catalog_id=None): def hasPath(self, path, sql_catalog_id=None):
......
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