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

🐛 Fix Bulkrax Collection Relationships job #199

Merged
merged 1 commit into from
Nov 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions app/models/collection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,15 @@

# Generated by hyrax:models
class Collection < ActiveFedora::Base
# this is the unique identifier bulkrax uses for import.
# this property only needs to be added to the model so it can be saved for works.
# it will not show in the public view for users, and cannot be entered manually via the edit work form.
property :source_identifier, predicate: ::RDF::URI.new("https://atla.com/terms/sourceIdentifier"), multiple: false

include ::Hyrax::CollectionBehavior
# You can replace these metadata if they're not suitable
# This must come after the properties because it finalizes the metadata
# schema (by adding accepts_nested_attributes)
include Hyrax::BasicMetadata
laritakr marked this conversation as resolved.
Show resolved Hide resolved
self.indexer = CollectionIndexer
after_update :remove_featured, if: proc { |collection| collection.private? }
Expand All @@ -12,9 +19,4 @@ class Collection < ActiveFedora::Base
def remove_featured
FeaturedCollection.where(collection_id: id).destroy_all
end

# this is the unique identifier bulkrax uses for import.
# this property only needs to be added to the model so it can be saved for works.
# it will not show in the public view for users, and cannot be entered manually via the edit work form.
property :source_identifier, predicate: ::RDF::URI.new("https://atla.com/terms/sourceIdentifier"), multiple: false
end
Loading