mirror of
https://github.com/meineerde/redmine.git
synced 2026-02-01 03:57:15 +00:00
Fix RuboCop offense Performance/StringInclude in app/controllers/imports_controller.rb (#37247).
git-svn-id: https://svn.redmine.org/redmine/trunk@21999 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
bf9585ac42
commit
cec30f9a05
@ -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']))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user