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