Skip to content

Commit

Permalink
use target id in transfers
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Jun 3, 2020
1 parent 3d4919d commit e8784b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/models/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/tasks/client.rake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e8784b0

Please sign in to comment.