Skip to content

Commit

Permalink
Capture record not found if a record's never been indexed.
Browse files Browse the repository at this point in the history
  • Loading branch information
tpendragon committed Jan 22, 2020
1 parent 0bf1340 commit 74a662e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/models/iiif_resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ def remove_hidden_solr_records
return if iiif_manifests.to_a.present?
doc = SolrDocument.find(noid, exhibit: exhibit)
solr.delete_by_id(doc.id, params: { softCommit: true })
rescue Blacklight::Exceptions::RecordNotFound
Rails.logger.debug "No solr record for #{noid} to delete."
end

def set_noid
Expand Down

0 comments on commit 74a662e

Please sign in to comment.