FIX: Avoid loading reactions index when plugin is not installed (#30749)

Adding fix to avoid loading reactions indexes when plugin is not
installed
This commit is contained in:
Ruben Oussoren 2025-01-13 17:35:22 -05:00 committed by GitHub
parent f9a000ff9f
commit fba1a483c1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -311,9 +311,15 @@ class BulkImport::Base
@chat_message_mapping = load_index(MAPPING_TYPES[:chat_message])
@last_chat_message_id = last_id(Chat::Message)
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
end
end
def use_bbcode_to_md?