NullResource doesn't aq-wrap newly created object during PUT
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zope 2 |
Fix Released
|
Medium
|
Unassigned |
Bug Description
If you upload something via DAV, a NullResource object is created to stand in for the to-be-created object. NullResource.PUT creates the object, and turns around and calls the newly created object's PUT method. But when it does that, it does not acquisition-wrap the newly-created object. Content PUT functions are apparently free to assume that "self" is already wrapped ala CMF's Image.py, which tries to do cataloging during a PUT. These will fail.
I'm not sure what the right thing to do is. It would be pretty trivial to aq-wrap the object in NullResource before calling its PUT, but is this right? Which piece of code is wrong, the content PUT function that assumes the object is in context, the factory function (which returns an unwrapped object), or the NullResource code?
Wrapping the object before calling its PUT method was correct.
Fix released in 2.8.0.