mirror of
https://github.com/discourse/discourse.git
synced 2025-03-20 06:16:41 +08:00
FIX: discourse_merger halts when topic has nil category
This commit is contained in:
parent
1772b56cda
commit
c33ee13c4c
@ -218,7 +218,7 @@ class BulkImport::DiscourseMerger < BulkImport::Base
|
||||
end
|
||||
|
||||
def copy_topics
|
||||
copy_model(Topic, skip_processing: true, mapping: @topics)
|
||||
copy_model(Topic, mapping: @topics)
|
||||
[TopicAllowedGroup, TopicAllowedUser, TopicEmbed, TopicSearchData,
|
||||
TopicTimer, TopicUser, TopicViewItem
|
||||
].each do |k|
|
||||
@ -434,6 +434,11 @@ class BulkImport::DiscourseMerger < BulkImport::Base
|
||||
end
|
||||
end
|
||||
|
||||
def process_topic(topic)
|
||||
return nil if topic['category_id'].nil?
|
||||
topic
|
||||
end
|
||||
|
||||
def process_post(post)
|
||||
post[:last_editor_id] = user_id_from_imported_id(post[:user_id])
|
||||
@topic_id_by_post_id[post[:id]] = post[:topic_id]
|
||||
|
Loading…
x
Reference in New Issue
Block a user