Db check required because of broken installation of redmine - caused by query with User.current
This commit is contained in:
10
init.rb
10
init.rb
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user