Commit 504f1a71 authored by Ayush Tiwari's avatar Ayush Tiwari

erp5_catalog: [Migration] Exception while migrating catalog object

As now, we expect our catalog object to be erp5 catalog and not indexable,
so its important to not reindex or unindex the old object.
parent 6fe99692
......@@ -47,6 +47,10 @@ def changeObjectClass(self, object_id, new_class):
new_obj = self._getOb(object_id, new_obj)
if new_obj.isIndexable:
new_obj.reindexObject()
elif new_obj.portal_type == 'Catalog':
# In case of 'Catalog' portal_type, we don't want unindexing or reindexing
# as we don't expect it to be indexable.
pass
else:
old_obj.unindexObject()
return new_obj
......
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