mirror of
https://github.com/discourse/discourse.git
synced 2025-04-16 20:59:06 +08:00
FIX: vanilla importer when private topic had no first post (WAT)
This commit is contained in:
parent
66aaa9329e
commit
b84198af6a
@ -176,6 +176,8 @@ class ImportScripts::Vanilla < ImportScripts::Base
|
|||||||
puts "", "importing private topics..."
|
puts "", "importing private topics..."
|
||||||
|
|
||||||
create_posts(@conversations) do |conversation|
|
create_posts(@conversations) do |conversation|
|
||||||
|
next if conversation[:first_message_id].blank?
|
||||||
|
|
||||||
# list all other user ids in the conversation
|
# list all other user ids in the conversation
|
||||||
user_ids_in_conversation = @user_conversations.select { |uc| uc[:conversation_id] == conversation[:conversation_id] && uc[:user_id] != conversation[:insert_user_id] }
|
user_ids_in_conversation = @user_conversations.select { |uc| uc[:conversation_id] == conversation[:conversation_id] && uc[:user_id] != conversation[:insert_user_id] }
|
||||||
.map { |uc| uc[:user_id] }
|
.map { |uc| uc[:user_id] }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user