Magento 2.1 Rest API save attribute group does not change attribute_set_id
-
09-10-2020 - |
Question
Preconditions
Magento 2.1.7
PHP 7.0.18
Steps to reproduce
1. Having a test attribute group:
{
"attribute_group_id": "103",
"attribute_group_name": "Test",
"attribute_set_id": 4,
"extension_attributes": []
}
- Send a Rest API request:
PUT /rest/V1/products/attribute-sets/4/groups
Headers:
content-type: application/json
Authorization: Bearer <authorization token>
Body:
{
"group": {
"attribute_group_id": "103",
"attribute_group_name": "Test",
"attribute_set_id": 13,
"extension_attributes": []
}
}
Expected result
{
"attribute_group_id": "103",
"attribute_group_name": "Test",
"attribute_set_id": 13,
"extension_attributes": []
}
Actual result
{
"attribute_group_id": "103",
"attribute_group_name": "Test",
"attribute_set_id": 4,
"extension_attributes": []
}
Response 200 OK.
Works if changing "attribute_group_name".
Solution
Acknowledged as a bug. Link to the issue on GitHub.
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange