fix error
This commit is contained in:
parent
74776dce36
commit
fa41d7c061
|
@ -52,45 +52,28 @@ module Admin::PersonalProjectsHelper
|
|||
project = Project.new
|
||||
row.cells.each_with_index do |cell,index|
|
||||
next if index < 2
|
||||
next if cell.nil?
|
||||
val = cell.value
|
||||
next if val.nil? || val == ""
|
||||
val = cell.value rescue nil
|
||||
case index
|
||||
when 2
|
||||
value = {"en" => val}
|
||||
when 3
|
||||
begin
|
||||
value["zh_tw"] = val
|
||||
rescue
|
||||
value = {"zh_tw" => val}
|
||||
value["zh_tw"] = val
|
||||
end
|
||||
project.project_title_translations = value
|
||||
when 4
|
||||
value = {"en" => val}
|
||||
when 5
|
||||
begin
|
||||
value["zh_tw"] = val
|
||||
rescue
|
||||
value = {"zh_tw" => val}
|
||||
end
|
||||
value["zh_tw"] = val
|
||||
project.job_title_translations = value
|
||||
when 6
|
||||
value = {"en" => val}
|
||||
when 7
|
||||
begin
|
||||
value["zh_tw"] = val
|
||||
rescue
|
||||
value = {"zh_tw" => val}
|
||||
end
|
||||
value["zh_tw"] = val
|
||||
project.participator_translations = value
|
||||
when 8
|
||||
value = {"en" => val}
|
||||
when 9
|
||||
begin
|
||||
value["zh_tw"] = val
|
||||
rescue
|
||||
value = {"zh_tw" => val}
|
||||
end
|
||||
value["zh_tw"] = val
|
||||
project.unit_translations = value
|
||||
when 10
|
||||
project.year = val
|
||||
|
|
Loading…
Reference in New Issue