mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
Fix issue setting post author during import from Quandora
This commit is contained in:
@ -56,9 +56,9 @@ class ImportScripts::Quandora < ImportScripts::Base
|
||||
|
||||
post = create_post(topic, topic[:id])
|
||||
|
||||
unless created_topic.is_a?(Post)
|
||||
unless post.is_a?(Post)
|
||||
puts "Error creating topic #{topic[:id]}. Skipping."
|
||||
puts created_topic.inspect
|
||||
puts post.inspect
|
||||
end
|
||||
end
|
||||
|
||||
@ -76,7 +76,7 @@ class ImportScripts::Quandora < ImportScripts::Base
|
||||
return # already imported
|
||||
end
|
||||
post[:topic_id] = topic_id
|
||||
post[:user_id] = user_id_from_imported_user_id(post[:author_id])
|
||||
post[:user_id] = user_id_from_imported_user_id(post[:author_id]) || -1
|
||||
new_post = create_post post, post[:id]
|
||||
unless new_post.is_a?(Post)
|
||||
puts "Error creating post #{post[:id]}. Skipping."
|
||||
|
Reference in New Issue
Block a user