From 04f4c1b8a301bb0795b1bbcdc0607f874d175eff Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Thu, 18 Jul 2019 07:45:06 +0200 Subject: [PATCH] fixed variable names --- app/jobs/affiliation_job.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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