-
-
Notifications
You must be signed in to change notification settings - Fork 730
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
Error 500 when product category left blank #12591
Comments
Hi Ideally, I would change the callback to be called before the product is saved but I see we have a different approach to setting variant supplier and category (primary_taxon) when doing imports.
This approach may need some changes everywhere we are creating products and I don't know if it's important to have a variant created when creating a product. Another possible solution will be to conditionally perform validation (presence) of supplier_id and primary_taxon_id at the controller level to include errors in the product error object. |
Thanks for looking in to this @wandji20 . If you want a bit of context you can look at #9069 .In short we are simplifying our data model, we are moving pretty much every thing to the variant. But we are yet to change the UI/UX, hence why we are creating a variant when creating a new product. But there is nothing enforcing that a product has to have at least one variant.
You can't really do that because you need a product to create a variant. But I think we could do something similar by having a |
Thanks for explaining @rioug I will give it a shot and reach out if I doubt anything |
Description
This seems to be a somewhat recent regression:
leaving the product category empty while creating a product returns an error 500.
Expected Behavior
leaving the product category empty while creating should display a message to the user, no error 500 should be seen - See pic below, taken from staging-UK which has not been updated for quite a while now:
Actual Behaviour
Leaving the product category empty while creating a product returns an error 500.
Steps to Reproduce
Animated Gif/Screenshot
Screencast.from.19-06-24.14_47_17.webm
Workaround
Fill in product category before clicking "Create"
Severity
bug-s3: a feature is broken but there is a workaround
Your Environment
Possible Fix
The text was updated successfully, but these errors were encountered: