-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Resolve API create /V1/products/attribute-sets/groups ("sort_order" and "attribute_group_code") not changing. #23690
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
Conversation
Hi @edenduong. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
6732ee1
to
f46fc24
Compare
f46fc24
to
aa25ca5
Compare
Hi @edenduong, thank you for your contribution! |
f26bf58
to
3a05949
Compare
@magento give me test instance |
Hi @edenduong. Thank you for your request. I'm working on Magento instance for you |
Hi @edenduong, here is your new Magento instance. |
98e29ed
to
fcd05c6
Compare
Hi @orlangur : Could you please review my pull request? |
…nd "attribute_group_code") not changing. issue 23634
b2a1dec
to
79410c8
Compare
Hi @swnsma, thank you for the review. |
…sort_order" and "attribute_group_code") not changing. #23690
Hi @edenduong, thank you for your contribution! |
Description (*)
#23634: Resolve API create /V1/products/attribute-sets/groups two fields (sort_order and "attribute_group_code" field) not changing in the DataBase. Remember check in the Database, because the API always return the "sort_order" and "attribute_group_code" which is sent in the body parameter of request.
Solution: The reason is in the save() function, it doesn't get the value in the extension_attributes. To fix it, in the save() function of repository, we need to get the value in the extension_attributes and add them to the model.
Fixed Issues (if relevant)
Manual testing scenarios (*)
Call the API:
Method: POST
http://[magento2 domain]/rest/default/V1/integration/admin/token
{"username":"admin","password":"123123q"}
The result is the [TOKEN]
Method: POST
http://[magento 2 domain]/rest/default/V1/products/attribute-sets/groups
Authorization: Bearer [TOKEN]
Check in the Database, the last record in the table "eav_attribute_group". The attribute_group_code : "details-test" and "sort_order": "50" are saved correctly.
Remember check in the Database, because the API always return the "sort_order" and "attribute_group_code" which is sent in the body parameter of request.
Questions or comments
Contribution checklist (*)