diff options
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/imports_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/imports_controller.rb b/app/controllers/imports_controller.rb index acb41999f..eb4b330bb 100644 --- a/app/controllers/imports_controller.rb +++ b/app/controllers/imports_controller.rb @@ -58,7 +58,7 @@ class ImportsController < ApplicationController end rescue CSV::MalformedCSVError, EncodingError => e - if e.is_a?(CSV::MalformedCSVError) && e.message !~ /Invalid byte sequence/ + if e.is_a?(CSV::MalformedCSVError) && !e.message.include?('Invalid byte sequence') flash.now[:error] = l(:error_invalid_csv_file_or_settings, e.message) else flash.now[:error] = l(:error_invalid_file_encoding, :encoding => ERB::Util.h(@import.settings['encoding'])) |