-
Notifications
You must be signed in to change notification settings - Fork 474
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
Shopify Product tags
format is inconsistent between GET and POST
#1173
Comments
This issue is stale because it has been open for 60 days with no activity. It will be closed if no further action occurs in 14 days. |
Not stale |
I can reproduce this issue in 13.1.0, product = shop.execute_shopify_api { ShopifyAPI::Product.find(id: 7084933120074) }
product.tags #=> "foo"
product.save
# shopify_api-13.1.0/lib/shopify_api/clients/http_client.rb:71:
# in `request': {"errors":{"product":"Required parameter missing or invalid"},
# "error_reference":"If you report this error, please include this id: 7f494072-d3f9-46ce-ac60-60a5848feed8."}
# (ShopifyAPI::Errors::HttpResponseError)
product.tags = ['foo']
product.save # success |
The |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue summary
When we access
product.tags
it returns a string of comma separated tags.When we save the product, it is required to set the
tags
to an array of tags.This means that fetching a product and saving it without touching the tags results in an error :
shopify_api
version: 13.0.0Expected behavior
The object returned by
find
or similar fetching methods should be in a state where they can be saved without the user having to map some fields (that he might not even be touching) in a different format.Actual behavior
If you don't map the
tags
field from string to array, you can't save the product.Steps to reproduce the problem
The text was updated successfully, but these errors were encountered: