mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-20 07:21:12 +00:00
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
This commit is contained in:
parent
8b0c21cbf8
commit
ddcdac3017
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user