Skip to content

Commit

Permalink
fix rake task
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Jun 3, 2020
1 parent 5785120 commit 6a9954f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/tasks/client.rake
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ namespace :client do
prefixes_to_keep = %w(10.4124 10.4225 10.4226 10.4227)

# delete all associated prefixes
prefixes = client.prefixes.where.not('prefixes.uid IN (?)', prefixes_to_keep).pluck(:uid)
prefixes = client.prefixes.where.not('prefixes.uid IN (?)', prefixes_to_keep)
prefix_ids = client.prefixes.where.not('prefixes.uid IN (?)', prefixes_to_keep).pluck(:id)

response = client.client_prefixes.destroy_all
Expand All @@ -162,7 +162,6 @@ namespace :client do
Doi.transfer(from_date: "2011-01-01", client_id: client.symbol, client_target_id: target.symbol)

prefixes.each do |prefix|
puts prefix
provider_prefix = ProviderPrefix.create(provider: target.provider, prefix: prefix)
puts "Provider prefix for provider #{target.provider.symbol} and prefix #{prefix} created."
client_prefix = ClientPrefix.create(client: target, prefix: prefix, provider_prefix: provider_prefix.id)
Expand Down

0 comments on commit 6a9954f

Please sign in to comment.