Commit 7b3ec6a5 authored by Ayush Tiwari's avatar Ayush Tiwari Committed by Ayush Tiwari

bt5_config: Better to use _delObject and _setObject as handle indexing also

parent 6acb6ee6
...@@ -694,12 +694,13 @@ class BusinessItem(Implicit, Persistent): ...@@ -694,12 +694,13 @@ class BusinessItem(Implicit, Persistent):
old_obj = container._getOb(object_id, None) old_obj = container._getOb(object_id, None)
# delete the old object before installing a new object # delete the old object before installing a new object
if old_obj: if old_obj:
container._delOb(object_id) container._delObject(object_id)
# If sign is +1, set the new object on the container
if self._sign == 1: if self._sign == 1:
# install object # install object
obj = self._value obj = self._value
obj = obj._getCopy(container) obj = obj._getCopy(container)
container._setOb(object_id, obj) container._setObject(object_id, obj)
obj = container._getOb(object_id) obj = container._getOb(object_id)
obj.isIndexable = ConstantGetter('isIndexable', value=False) obj.isIndexable = ConstantGetter('isIndexable', value=False)
aq_base(obj).uid = portal.portal_catalog.newUid() aq_base(obj).uid = portal.portal_catalog.newUid()
......
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