diff --git a/lib/dradis/plugins/calculators/cvss/engine.rb b/lib/dradis/plugins/calculators/cvss/engine.rb index f3d23bc..890ae55 100644 --- a/lib/dradis/plugins/calculators/cvss/engine.rb +++ b/lib/dradis/plugins/calculators/cvss/engine.rb @@ -22,17 +22,12 @@ class Engine < ::Rails::Engine end initializer 'calculator_cvss.mount_engine' do - # By default, this engine is loaded into the main app. So, upon app - # initialization, we first check if the DB is loaded and the Configuration - # table has been created, before checking if the engine is enabled Rails.application.reloader.to_prepare do - if (ActiveRecord::Base.connection rescue false) && ::Configuration.table_exists? - Rails.application.routes.append do - # Enabling/disabling integrations calls Rails.application.reload_routes! we need the enable - # check inside the block to ensure the routes can be re-enabled without a server restart - if Engine.enabled? - mount Engine => '/', as: :cvss_calculator - end + Rails.application.routes.append do + # Enabling/disabling integrations calls Rails.application.reload_routes! we need the enable + # check inside the block to ensure the routes can be re-enabled without a server restart + if Engine.enabled? + mount Engine => '/', as: :cvss_calculator end end end