Skip to main content

Attributes lifecycle

Deleting attribute

If you are deleting an attribute, it will affect the following:

  • Variant selection will lose the mapping.

  • Attribute data assigned to products and content will be lost

  • Types will no longer have the attribute.

Note that Saleor does not prevent you from deleting an attribute in use. It is up to the developer to ensure that the attribute is not in use before deleting it.

tip

If you are unsure if it is safe to delete the attribute, you can make it private to see if it has any negative effect.

Marking as required

It is possible to change an attribute from required to optional, which means that there is no guarantee that the value will be present.

Tip: Because attribute values can be missing, it is a good idea to make your code resilient to missing values.