From a4a308a0627634f1d9ea8eafa49d6e28161eddfd Mon Sep 17 00:00:00 2001 From: Justin Coyne Date: Wed, 23 Oct 2019 14:12:24 -0500 Subject: [PATCH] Update method of deleting objects from fedora and solr The previous methods no longer worked with dor-services 8 --- app/services/delete_service.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/services/delete_service.rb b/app/services/delete_service.rb index 0509dd8c3..89635564d 100644 --- a/app/services/delete_service.rb +++ b/app/services/delete_service.rb @@ -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