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

don't attempt to save AF::WithMetadata::MetadataNode#file_hash #5320

Merged
merged 2 commits into from
Jan 11, 2022

Commits on Jan 11, 2022

  1. refactor Hyrax::FileMetadata specs

    one expectation per test; use named rspec subject.
    tamsin johnson committed Jan 11, 2022
    Configuration menu
    Copy the full SHA
    ab9d86b View commit details
    Browse the repository at this point in the history
  2. don't attempt to save AF::WithMetadata::MetadataNode#file_hash

    `ActiveFedora::WithMetadata::MetadataNode` provides a `#file_hash` attribute,
    but writing to it, even with the existing data, prevents all saves.
    
    Wings needs to map data in and out of this class freely, and this attribute
    functions as a honeypot. it baits Wings to preserve the data, and then fails
    save when the converters try to do keep the existing data. since any attempt to
    write this data will break save, ActiveFedora should treat it as read only.
    
    never include `MetadataNode#file_hash` in changed attributes lists when Wings is
    loaded.
    tamsin johnson committed Jan 11, 2022
    Configuration menu
    Copy the full SHA
    b906c82 View commit details
    Browse the repository at this point in the history