Skip to content

Option Group Duplication When Creating Product Attributes with Option Type #372

@girase1pranay

Description

@girase1pranay

Steps to reproduce:

  1. Create a Product Class using the /admin/productclasses [POST] API.

  2. Create an Option Group using the /admin/attributeoptiongroups [POST] API.

  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions