Commit f7a912ac authored by Ayush Tiwari's avatar Ayush Tiwari

erp5_catalog: Use setProperty from Base class instead of _updateProperty from...

erp5_catalog: Use setProperty from Base class instead of _updateProperty from PropertyManager to update/set property for ERP5Catalog object
parent 319a6ad4
......@@ -1745,16 +1745,15 @@ 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():
#import pdb; pdb.set_trace()
# 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 property_id == 'title':
# Ignore case when property_id is title
#erp5_catalog.setTitle('erp5_catalog_new')
continue
value = getattr(sql_catalog, property_id)
erp5_catalog._updateProperty(id=property_id, value=value)
property_type = sql_catalog.getPropertyType(property_id)
erp5_catalog.setProperty(key=property_id, value=value, type=property_type)
Globals.InitializeClass(ERP5Site)
......
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