Skip to content

A platform for community discussion. Free, open, simple.

FIX: Do not fail if Postgres is not available (#12440)

Bianca Nenciu6eab1e83c3cb
diff --git a/plugins/discourse-narrative-bot/plugin.rb b/plugins/discourse-narrative-bot/plugin.rb
index 2a6136176ab..3aee2633d69 100644
--- a/plugins/discourse-narrative-bot/plugin.rb
+++ b/plugins/discourse-narrative-bot/plugin.rb
@@ -48,7 +48,7 @@ after_initialize do
'../lib/discourse_narrative_bot/welcome_post_type_site_setting.rb'
].each { |path| load File.expand_path(path, __FILE__) }
- RailsMultisite::ConnectionManagement.each_connection do
+ RailsMultisite::ConnectionManagement.safe_each_connection do
if SiteSetting.discourse_narrative_bot_enabled
# Disable welcome message because that is what the bot is supposed to replace.
SiteSetting.send_welcome_message = false