Skip to content

Commit

Permalink
Merge pull request #199 from scientist-softserv/fix-bulkrax-collectio…
Browse files Browse the repository at this point in the history
…n-relationship

🐛 Fix Bulkrax Collection Relationships job
  • Loading branch information
laritakr authored Nov 28, 2023
2 parents c3c851f + 51b62bc commit f98d95f
Showing 1 changed file with 7 additions and 5 deletions.
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
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

0 comments on commit f98d95f

Please sign in to comment.