mirror of
https://github.com/discourse/discourse.git
synced 2025-02-24 16:49:57 +08:00
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:
parent
f9a000ff9f
commit
fba1a483c1
@ -311,9 +311,15 @@ class BulkImport::Base
|
|||||||
@chat_message_mapping = load_index(MAPPING_TYPES[:chat_message])
|
@chat_message_mapping = load_index(MAPPING_TYPES[:chat_message])
|
||||||
@last_chat_message_id = last_id(Chat::Message)
|
@last_chat_message_id = last_id(Chat::Message)
|
||||||
|
|
||||||
puts "Loading reaction indexes..."
|
if defined?(::DiscourseReactions)
|
||||||
@discourse_reaction_mapping = load_index(MAPPING_TYPES[:discourse_reactions_reaction])
|
puts "Loading reaction indexes..."
|
||||||
@last_discourse_reaction_id = last_id(DiscourseReactions::Reaction)
|
@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
|
end
|
||||||
|
|
||||||
def use_bbcode_to_md?
|
def use_bbcode_to_md?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user