Commit 4dda044a authored by Ayush Tiwari's avatar Ayush Tiwari Committed by Eteri

ZSQLCatalog: Use isIndexable from portal object directly

Required as preparation for migrating to ERP5 catalog which itself has an accessor
`isIndexable` which we plan to remain disabled all the time. So better to rely
directly on isIndexable from erp5 site object.
parent 317b3c2c
...@@ -1288,7 +1288,7 @@ class Catalog(Folder, ...@@ -1288,7 +1288,7 @@ class Catalog(Folder,
Similar problems may happen with relations and acquisition of uid values (ex. order_uid) Similar problems may happen with relations and acquisition of uid values (ex. order_uid)
with the risk of graph loops with the risk of graph loops
""" """
if not self.isIndexable(): if not self.getPortalObject().isIndexable():
return None return None
klass = self.__class__ klass = self.__class__
...@@ -1461,7 +1461,7 @@ class Catalog(Folder, ...@@ -1461,7 +1461,7 @@ class Catalog(Folder,
LOG('ZSLQCatalog.SQLCatalog:catalogObjectList', WARNING, LOG('ZSLQCatalog.SQLCatalog:catalogObjectList', WARNING,
'idxs is ignored in this function and is only provided to be compatible with CMFCatalogAware.reindexObject.') 'idxs is ignored in this function and is only provided to be compatible with CMFCatalogAware.reindexObject.')
if not self.isIndexable(): if not self.getPortalObject().isIndexable():
return return
# Reminder about optimization: It might be possible to issue just one # Reminder about optimization: It might be possible to issue just one
...@@ -1710,7 +1710,7 @@ class Catalog(Folder, ...@@ -1710,7 +1710,7 @@ class Catalog(Folder,
""" """
Set the path as deleted Set the path as deleted
""" """
if not self.isIndexable(): if not self.getPortalObject().isIndexable():
return None return None
if uid is None and path is not None: if uid is None and path is not None:
...@@ -1740,7 +1740,7 @@ class Catalog(Folder, ...@@ -1740,7 +1740,7 @@ class Catalog(Folder,
XXX Add filter of methods XXX Add filter of methods
""" """
if not self.isIndexable(): if not self.getPortalObject().isIndexable():
return None return None
if uid is None and path is not None: if uid is None and path is not 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