Skip to content

Commit

Permalink
Merge pull request #715 from plone/714-migration-aq-wrapper
Browse files Browse the repository at this point in the history
fix accidental storage with aq wrapper in migrate_base_class_to_new_class
  • Loading branch information
davisagli authored Dec 11, 2024
2 parents 7f6e8c2 + a9bafbf commit c74347c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
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

0 comments on commit c74347c

Please sign in to comment.