A platform for community discussion. Free, open, simple.
FIX: Avoid loading reactions index when plugin is not installed (#30749)
Ruben Oussorenfba1a483c142
diff --git a/script/bulk_import/base.rb b/script/bulk_import/base.rbindex 32faf7c8f59..097f56ef6e9 100644--- a/script/bulk_import/base.rb+++ b/script/bulk_import/base.rb@@ -311,9 +311,15 @@ class BulkImport::Base@chat_message_mapping = load_index(MAPPING_TYPES[:chat_message])@last_chat_message_id = last_id(Chat::Message)- puts "Loading reaction indexes..."- @discourse_reaction_mapping = load_index(MAPPING_TYPES[:discourse_reactions_reaction])- @last_discourse_reaction_id = last_id(DiscourseReactions::Reaction)+ if defined?(::DiscourseReactions)+ puts "Loading reaction indexes..."+ @discourse_reaction_mapping = load_index(MAPPING_TYPES[:discourse_reactions_reaction])+ @last_discourse_reaction_id = last_id(DiscourseReactions::Reaction)+ else+ puts "Skipping reaction indexes - plugin not installed"+ @discourse_reaction_mapping = {}+ @last_discourse_reaction_id = 0+ endenddef use_bbcode_to_md?