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

Object should be frozen after being deserialized from Solr in ActiveFedora::LoadableFromJson#init_with_json #1342

Open
jrgriffiniii opened this issue Aug 15, 2018 · 0 comments

Comments

@jrgriffiniii
Copy link
Contributor

Currently, resource attributes are populated from the Solr Document, but the resource itself isn't frozen immediately following this:

      @resource = SolrBackedResource.new(self.class)
      self.attributes = adapt_attributes(attrs)
      # TODO: Should we clear the change tracking, or make this object Read-only?

      yield self if block_given?

      run_callbacks :find
      run_callbacks :initialize
      freeze

https://github.com/samvera/active_fedora/blob/master/lib/active_fedora/loadable_from_json.rb#L133

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

1 participant