Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
f57656e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
see https://plone.org/documentation/manual/upgrade-guide/version/upgrading-plone-3-x-to-4.0/updating-add-on-products-for-plone-4.0/use-plone.app.blob-based-blob-storage
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 plone.app.blob.migrations.migrate won't do the trick in this case anyway
f57656e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
f57656e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for your reply @gbastien - i created a pull request #15