Db check required because of broken installation of redmine - caused by query with User.current

This commit is contained in:
Alexander Meindl
2020-04-15 12:38:48 +02:00
parent 57f8ef4092
commit 25b2694018

10
init.rb
View File

@@ -39,6 +39,12 @@ Redmine::Plugin.register :redmine_messenger do
}, partial: 'settings/messenger_settings'
end
Rails.configuration.to_prepare do
RedmineMessenger.setup
begin
if ActiveRecord::Base.connection.table_exists?(Setting.table_name)
Rails.configuration.to_prepare do
RedmineMessenger.setup
end
end
rescue ActiveRecord::NoDatabaseError
Rails.logger.error 'database not created yet'
end