CSV import raises an exception if CSV header has empty columns (#22913, #34326).

git-svn-id: http://svn.redmine.org/redmine/trunk@20576 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA
2020-12-05 00:21:15 +00:00
parent bef2644f88
commit 135fd7b79f
2 changed files with 3 additions and 3 deletions

View File

@@ -173,7 +173,7 @@ class ImportsController < ApplicationController
return if @import.settings['encoding'].blank?
mappings = @import.settings['mapping'] ||= {}
headers = @import.headers.map(&:downcase)
headers = @import.headers.map{|header| header&.downcase}
# Core fields
import_type::AUTO_MAPPABLE_FIELDS.each do |field_nm, label_nm|