Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle update of products without categories #43

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

roynilsson
Copy link

@roynilsson roynilsson commented Oct 2, 2020

If the product does not have any categories set in Pimcore then the value for category_ids will be null. The count function does not allow null as a parameter and crashes the import. Adding a simple is_iterable to the if statement solves the problem and allows products without categories to be imported.

@roynilsson roynilsson closed this Oct 2, 2020
@roynilsson roynilsson reopened this Oct 2, 2020
@roynilsson roynilsson marked this pull request as ready for review October 2, 2020 09:35
Copy link

@harihhs harihhs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This simple change makes product import clean even without a catalog.
Thanks @roynilsson

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants