diff --git a/app/jobs/affiliation_job.rb b/app/jobs/affiliation_job.rb index b68cf8131..5a4efe802 100644 --- a/app/jobs/affiliation_job.rb +++ b/app/jobs/affiliation_job.rb @@ -6,11 +6,11 @@ def perform(doi_id) doi = Doi.where(doi: doi_id).first if doi.present? - new_creators = Array.wrap(creators).map do |c| + new_creators = Array.wrap(doi.creators).map do |c| c["affiliation"] = { "name" => c["affiliation"] } if c["affiliation"].is_a?(String) c end - new_contributors = Array.wrap(contributors).map do |c| + new_contributors = Array.wrap(doi.contributors).map do |c| c["affiliation"] = { "name" => c["affiliation"] } if c["affiliation"].is_a?(String) c end