Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix accidental storage with aq wrapper in migrate_base_class_to_new_class #715

Merged
merged 1 commit into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/714.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix migrate_base_class_to_new_class util to remove Acquisition wrappers. @davisagli
3 changes: 2 additions & 1 deletion plone/app/contenttypes/utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from Acquisition import aq_base
from plone.dexterity.interfaces import IDexterityContent
from plone.dexterity.interfaces import IDexterityFTI
from plone.folder.interfaces import IOrdering
Expand Down Expand Up @@ -97,7 +98,7 @@ def migrate_base_class_to_new_class(
parent = obj.__parent__
parent._delOb(obj_id)
obj.__class__ = new_class
parent._setOb(obj_id, obj)
parent._setOb(obj_id, aq_base(obj))

is_container = isinstance(obj, BTreeFolder2Base)

Expand Down
Loading