Steps to reproduce:
-
Create a Product Class using the /admin/productclasses [POST] API.
-
Create an Option Group using the /admin/attributeoptiongroups [POST] API.
-
Create a Product Attribute using the /admin/productattributes [POST] API.
The Product Attribute is of type "Option", which means an Option Group is required in the request. However, when creating the attribute using the /admin/productattributes [POST] API, a new Option Group is created every time, even if an existing, identical Option Group already exists.
This behavior is incorrect according to the django-oscar model, where a single Option Group can be reused across multiple attributes. The API should allow linking to an existing Option Group instead of creating a new one each time.
Steps to reproduce:
Create a Product Class using the /admin/productclasses [POST] API.
Create an Option Group using the /admin/attributeoptiongroups [POST] API.
Create a Product Attribute using the /admin/productattributes [POST] API.
The Product Attribute is of type "Option", which means an Option Group is required in the request. However, when creating the attribute using the /admin/productattributes [POST] API, a new Option Group is created every time, even if an existing, identical Option Group already exists.
This behavior is incorrect according to the django-oscar model, where a single Option Group can be reused across multiple attributes. The API should allow linking to an existing Option Group instead of creating a new one each time.