Skip to content

Commit

Permalink
Update method of deleting objects from fedora and solr
Browse files Browse the repository at this point in the history
The previous methods no longer worked with dor-services 8
  • Loading branch information
jcoyne committed Oct 23, 2019
1 parent cc8b1ff commit a4a308a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/services/delete_service.rb
Expand Up @@ -50,8 +50,8 @@ def remove_active_workflows
#
# @param [string] pid the druid
def delete_from_dor
Dor::Config.fedora.client["objects/#{druid}"].delete
Dor::SearchService.solr.delete_by_id(druid)
Dor::SearchService.solr.commit
ActiveFedora::Base.connection_for_pid(0).api.purge_object(pid: druid)
ActiveFedora::SolrService.instance.conn.delete_by_id(druid)
ActiveFedora::SolrService.instance.conn.commit
end
end

0 comments on commit a4a308a

Please sign in to comment.