Skip to content

When using the admin -> Customer Address API , the system allows creating multiple default addresses for the same customer. #583

Description

@harshit-webkul

Describe the bug
When using the admin -> Customer Address API , the system allows creating multiple default addresses for the same customer.

To Reproduce
Steps to reproduce the behavior:

  1. Use the admin -> Create Address API to add a customer address with "defaultAddress: true"
  2. Create another address using the same API request and again set "defaultAddress: true"
  3. Check the database and shop front.

Expected behavior
Only one default address should exist for each customer.

Screenshots
If applicable, add screenshots to help explain your problem.

Image

Actual Result:

The API allows multiple default addresses for the same customer.
Existing default addresses are not updated or unset.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions