We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When creating a product in the sandbox (in current main branch):
main
$ curl --user mdk:supersecret -XPOST http://localhost:8000/api/admin/products/ -H "Content-Type: application/json" -d '{"product_class": "testtype", "slug": "test", "attributes": [{"code": "text", "value": "1"}]}'
it works, but when I use an empty value, like:
$ curl --user mdk:supersecret -XPOST http://localhost:8000/api/admin/products/ -H "Content-Type: application/json" -d '{"product_class": "testtype", "slug": "test", "attributes": [{"code": "text", "value": ""}]}'
I'm getting a 500 error.
It looks like it's due to the ProductAttributeValueSerializer's update_or_create method doing:
ProductAttributeValueSerializer
attribute.save_value(product, value) return product.attribute_values.get(attribute=attribute)
the save may not save empty values (which looks OK to me) so the following get fails.
get
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When creating a product in the sandbox (in current
main
branch):it works, but when I use an empty value, like:
I'm getting a 500 error.
It looks like it's due to the
ProductAttributeValueSerializer
's update_or_create method doing:the save may not save empty values (which looks OK to me) so the following
get
fails.The text was updated successfully, but these errors were encountered: