Commit d1a6b249 authored by Ayush Tiwari's avatar Ayush Tiwari

SQLCatalog: Add getters for attributes in SQLCatalog

Also, update the files where they have been used
parent 7474b2b9
......@@ -3,8 +3,8 @@ portal = context.getPortalObject()
# This scriptable key supports content_translation if the table is present
catalog = portal.portal_catalog.getSQLCatalog()
if 'content_translation' in catalog.getProperty('sql_search_tables'):
if [x for x in catalog.getProperty('sql_catalog_search_keys', []) if 'Mroonga' in x]:
if 'content_translation' in catalog.getSqlSearchTablesList():
if [x for x in catalog.getSqlCatalogSearchKeysList() if 'Mroonga' in x]:
return AndQuery(SimpleQuery(**{'content_translation.translated_text': value, 'comparison_operator': 'mroonga_boolean'}),
Query(**{'content_translation.property_name': 'title'}))
else:
......
......@@ -59,7 +59,7 @@ class CatalogKeywordKeyConfiguratorItem(ConfiguratorItemMixin, XMLObject):
error_list = []
portal = self.getPortalObject()
catalog = portal.portal_catalog.getSQLCatalog()
key_list = list(catalog.getProperty('sql_catalog_keyword_search_keys', ()))
key_list = list(catalog.getSqlCatalogSearchKeysList())
for k in self.key_list:
if k not in key_list:
error_list.append(self._createConstraintMessage(
......
This diff is collapsed.
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