FIX: Return actual errors if PostCreator fails (#7096)

FIX: Return actual errors if PostCreator fails (#7096)

diff --git a/script/import_scripts/base.rb b/script/import_scripts/base.rb
index b6bb176..4b2965e 100644
--- a/script/import_scripts/base.rb
+++ b/script/import_scripts/base.rb
@@ -563,7 +563,7 @@ class ImportScripts::Base
     post_creator = PostCreator.new(user, opts)
     post = post_creator.create
     post_create_action.try(:call, post) if post
-    post ? post : post_creator.errors.full_messages
+    if !post || post_creator.errors&.length > 0 ? post : post_creator.errors.full_messages
   end
 
   def create_upload(user_id, path, source_filename)

GitHub sha: 655a08db

Fix error in base import script