Insufficient checking of PostCreator in importer base


(Neil McGovern) #1

Hi,

It seems that if (for example) you mistakenly try and add target_usernames to a post with user_ids rather than usernames, create_post in scripts/import_scripts/base.rb won’t return an error.

This is because it returns: post ? post : post_creator.errors.full_messages. However, post has already been initialised as a Post type on line 564. Checking for the post_creator errors instead returns the correct behaviour.

I’ll submit a pull request for this :slight_smile:


(Sam Saffron) #2

Sure, please do. :hugs:


(Neil McGovern) #3

(Joshua Rosenfeld) #4

The PR has been merged.


(Joshua Rosenfeld) closed #5

This topic was automatically closed after 42 hours. New replies are no longer allowed.