diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2020-07-08 17:30:12 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2020-07-08 17:30:12 +0000 |
commit | ddcdac3017a606263843b82c668c3ae087edfa0c (patch) | |
tree | 1f47dc2ba9587a7cab1fc093983d7f77a90f78f3 /app | |
parent | 8b0c21cbf87f292557cc2949fa9c1027398e79bb (diff) | |
download | redmine-ddcdac3017a606263843b82c668c3ae087edfa0c.tar.gz redmine-ddcdac3017a606263843b82c668c3ae087edfa0c.zip |
avoid using rescue in its modifier form at ImportsController#import_type
git-svn-id: http://svn.redmine.org/redmine/trunk@19864 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/imports_controller.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/controllers/imports_controller.rb b/app/controllers/imports_controller.rb index 60376f4f0..ed42342ce 100644 --- a/app/controllers/imports_controller.rb +++ b/app/controllers/imports_controller.rb @@ -157,7 +157,12 @@ class ImportsController < ApplicationController if @import @import.class else - type = Object.const_get(params[:type]) rescue nil + type = + begin + Object.const_get(params[:type]) + rescue + nil + end type && type < Import ? type : nil end end |