diff --git a/app/models/client.rb b/app/models/client.rb index 1c209ab55..08c3f43b2 100644 --- a/app/models/client.rb +++ b/app/models/client.rb @@ -329,6 +329,7 @@ def target_id=(value) return nil unless c.present? client_target = c.records.first + Rails.logger.info "[Transfer] with target client #{client_target.symbol}" Doi.transfer(client_id: symbol.downcase, client_target_id: client_target.id) end diff --git a/lib/tasks/client.rake b/lib/tasks/client.rake index 5ede33029..9c56a4785 100644 --- a/lib/tasks/client.rake +++ b/lib/tasks/client.rake @@ -159,7 +159,7 @@ namespace :client do end # update dois - Doi.transfer(from_date: "2011-01-01", client_id: client.symbol, client_target_id: target.symbol) + Doi.transfer(from_date: "2011-01-01", client_id: client.symbol, client_target_id: target.id) prefixes.each do |prefix| provider_prefix = ProviderPrefix.create(provider: target.provider, prefix: prefix)