Skip to content
Snippets Groups Projects
Commit 6114e782 authored by Arnaud Levy's avatar Arnaud Levy
Browse files

fix alumni import

parent 65e66fd3
No related branches found
No related tags found
No related merge requests found
......@@ -29,13 +29,15 @@ class University::Person::Alumnus::Import < ApplicationRecord
protected
def parse
# substitute local data for testing
substitutes = {
'c6b78fac-0a5f-4c44-ad22-4ee68ed382bb' => '23279cab-8bc1-4c75-bcd8-1fccaa03ad55'
}
csv.each do |row|
program_id = row['program']
program_id = substitutes[program_id] if substitutes.has_key? program_id
if Rails.env.development? &&
# substitute local data for testing
substitutes = {
'c6b78fac-0a5f-4c44-ad22-4ee68ed382bb' => '23279cab-8bc1-4c75-bcd8-1fccaa03ad55'
}
program_id = substitutes[program_id] if substitutes.has_key? program_id
end
program = university.education_programs
.find_by(id: program_id)
next if program.nil?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment