Commit 29a7751f authored by Ayush Tiwari's avatar Ayush Tiwari

erp5_catalog: Dont try to update title property of new catalog

parent 2fe9d8d0
......@@ -1730,8 +1730,12 @@ class ERP5Site(FolderMixIn, CMFSite, CacheCookieMixin):
# Update properties list for the new catalog from the SQLCatalog
# Not an efficient way to carry this
for property_id in sql_catalog.propertyIds():
value = getattr(sql_catalog, property_id)
new_erp5_catalog._updateProperty(id=property_id, value=value)
# This is needed because there have been problems with setting property
# for title, see this docstring for explanations:
# https://lab.nexedi.com/nexedi/erp5/blob/198df7021a17725e81ab930015c3c618e94263db/product/ERP5Type/Base.py#L3531
if not property_id == 'title':
value = getattr(sql_catalog, property_id)
new_erp5_catalog._updateProperty(id=property_id, value=value)
# Use the new ERP5Catalog object as the default sql catalog
self.portal_catalog.default_sql_catalog_id = new_id
......
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