mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
Fix issue setting post author during import from Quandora
This commit is contained in:
parent
030fb71f60
commit
4fd83805a2
1 changed files with 6 additions and 6 deletions
|
@ -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."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue