Commit 81a76260 authored by Ayush Tiwari's avatar Ayush Tiwari Committed by Eteri

SQLCatalog: Add getters for attributes in SQLCatalog

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