[zope2-tracker] [Bug 537057] [NEW] initializeProduct chokes on product ids that match ids in the acquisition path?
ric at digitalmarbles.com
Wed Mar 10 20:46:58 EST 2010
Public bug reported:
It appears that App.Product.initializeProduct chokes on product ids that
match ids in the acquisition path.
The culprit appears to be line 253...
_setObject eventually calls OFS.ObjectManager.checkValidId which chokes
at line 119
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(aq_base(self), id):
# The object is located in this ObjectManager.
if not flags & REPLACEABLE:
raise BadRequest, (
'The id "%s" is invalid - it is already in use.' % id)
# else the object is replaceable even if the UNIQUE
# flag is set.
elif flags & UNIQUE:
raise BadRequest, ('The id "%s" is reserved.' % id)
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?
** Affects: zope2
initializeProduct chokes on product ids that match ids in the acquisition path?
You received this bug notification because you are a member of Zope 2
Developers, which is subscribed to Zope 2.
More information about the zope2-tracker