Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files


Use obj.Schema() instead of obj.schema or some fields (like the ones provided by archetypes.schemaextender) are not taken into account...
  • Loading branch information...
commit f57656ee2c5e483fd02db0d2ac256d6e98d9e609 1 parent baf0ad5
@gbastien gbastien authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/plone/app/blob/
2  src/plone/app/blob/
@@ -63,7 +63,7 @@ def fields_map(self):
def migrate_data(self):
fields = self.getFields(self.obj)
for name in fields:
- oldfield = self.obj.schema[name]
+ oldfield = self.obj.Schema()[name]
if hasattr(oldfield, 'removeScales'):
# clean up old image scales

3 comments on commit f57656e


this change unfortunately breaks the pattern that is suggested by the doucmentation to migrate existing image and file-fields to blobstorage.

the documentation suggests to add a schemaextender that uses a blob-field and this migrator is meant to access the old field.

with this change, the migrator copies empty blob files.

@gbastien i think this change should be reverted.

people that need to migrate fields defined via schemaextender to blobstorage need to write their own migration anyway since this won't do the trick in this case anyway


Hi @frisi

ok, if it is relevant regarding the documentation, then you can revert the change so it fits.

Maybe commenting the line and adding a relevant comment could be usefull? Or maybe it is possible to avoid to copy empty blob files by adding some check?


thanks for your reply @gbastien - i created a pull request #15

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