Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only ignore 'temporary' objects in the ObjectAddedEvent handler.
If we ignore temporary objects always, we cannot add references when first creating an object, because that'll try and create a KeyReference too, while the object is still inside of the portal_factory tool. Ignoring the add event will avoid creating a transaction on GET, while creating an explicit KeyReference for references is only done when attempting to save the object being created through the portal_factory, leading to a commit or abort depending on other factors. We can only test for this in the original event handler, because the event handler for IPersistent is also invoked even if we were to register a more 'specific' handler for OFS.interfaces.IZopeObject.
- Loading branch information
Showing
5 changed files
with
16 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters