initializeProduct chokes on product ids that match ids in the acquisition path?
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zope 2 |
Fix Released
|
Medium
|
Unassigned |
Bug Description
It appears that App.Product.
The culprit appears to be line 253...
products.
_setObject eventually calls OFS.ObjectManag
if not allow_dup:
obj = getattr(self, id, None)
if obj is not None:
# An object by the given id exists either in this
# ObjectManager or in the acquisition path.
flags = getattr(obj, '__replaceable__', NOT_REPLACEABLE)
if hasattr(
# The object is located in this ObjectManager.
if not flags & REPLACEABLE:
# else the object is replaceable even if the UNIQUE
# flag is set.
elif flags & UNIQUE:
because it acquires the object in the zodb root which cannot be replaced (nor should it).
This of course throws an error... BadRequest The id "%s" is invalid - it is already in use
Can someone confirm this is a real bug or an oddity in my setup?
Changed in zope2: | |
status: | Fix Committed → Fix Released |
What is the name of the product here?