From b84198af6a75ac98227e1f1b2fd87559acb0ecee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Mon, 18 Aug 2014 15:07:14 +0200 Subject: [PATCH] FIX: vanilla importer when private topic had no first post (WAT) --- script/import_scripts/vanilla.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/script/import_scripts/vanilla.rb b/script/import_scripts/vanilla.rb index e5127548edc..b8f03e15301 100644 --- a/script/import_scripts/vanilla.rb +++ b/script/import_scripts/vanilla.rb @@ -176,6 +176,8 @@ class ImportScripts::Vanilla < ImportScripts::Base puts "", "importing private topics..." create_posts(@conversations) do |conversation| + next if conversation[:first_message_id].blank? + # 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] } .map { |uc| uc[:user_id] }