Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Fix order_by in get_product_attributes (#14763)

Krzysztof Kwaśniak5b2ee678d86c
diff --git a/saleor/attribute/tests/model_helpers.py b/saleor/attribute/tests/model_helpers.py
index 1303c95408..136b0769c8 100644
--- a/saleor/attribute/tests/model_helpers.py
+++ b/saleor/attribute/tests/model_helpers.py
@@ -41,7 +41,7 @@ def get_product_attributes(product: Product):
)
return Attribute.objects.filter(
Exists(product_attributes.filter(attribute_id=OuterRef("id")))
- ).order_by("attributeproduct__sort_order")
+ ).order_by("storefront_search_position", "slug")
def get_product_attribute_values(product: Product, attribute: Attribute):