2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00

Fix error in base import script

Follow-up to 655a08dbbd
This commit is contained in:
Gerhard Schlager 2019-03-06 21:58:06 +01:00
parent 1121514799
commit 941e096df4

View file

@ -563,7 +563,7 @@ class ImportScripts::Base
post_creator = PostCreator.new(user, opts) post_creator = PostCreator.new(user, opts)
post = post_creator.create post = post_creator.create
post_create_action.try(:call, post) if post post_create_action.try(:call, post) if post
if !post || post_creator.errors&.length > 0 ? post : post_creator.errors.full_messages post && post_creator.errors.empty? ? post : post_creator.errors.full_messages
end end
def create_upload(user_id, path, source_filename) def create_upload(user_id, path, source_filename)