Skip to content
Browse files

Fix ATFile BLOB migration with LinguaPlone.

CAUTION: when the fix was discussed with witsch,
he pointed to the fact that the files would be
entirely loaded in memory during migration.
This could potentially eat too much memory.
  • Loading branch information...
1 parent df1dc03 commit 33ab73085fa545f6907bd03c2488ffcc996e30e2 @gotcha gotcha committed
Showing with 12 additions and 2 deletions.
  1. +10 −1 CHANGES.rst
  2. +2 −1 src/plone/app/blob/migrations.py
View
11 CHANGES.rst
@@ -4,7 +4,16 @@ Changelog
1.5.6 (unreleased)
------------------
-- Don't fail on obsucure chars in filename
+- Fix BLOB migration when LinguaPlone is installed.
+ Also for ATFile.
+
+ CAUTION: when the fix was discussed with witsch,
+ he pointed to the fact that the files would be
+ entirely loaded in memory during migration.
+ This could potentially eat too much memory.
+ [gotcha]
+
+- Don't fail on obscure chars in filename
[tomgross]
View
3 src/plone/app/blob/migrations.py
@@ -96,7 +96,8 @@ class ATFileToBlobMigrator(BaseMigrator):
}
def migrate_data(self):
- self.new.getField('file').getMutator(self.new)(self.old)
+ value = self.old.getField('file').getAccessor(self.old)()
+ self.new.getField('file').getMutator(self.new)(value)
def last_migrate_reindex(self):
self.new.reindexObject(idxs=['object_provides', 'portal_type',

0 comments on commit 33ab730

Please sign in to comment.
Something went wrong with that request. Please try again.