Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Rename type to more meaningful one
Adam Janik9fa3d99d3422
diff --git a/saleor/graphql/product/types.py b/saleor/graphql/product/types.pyindex b907ad5d8c..948bb8d650 100644--- a/saleor/graphql/product/types.py+++ b/saleor/graphql/product/types.py@@ -13,7 +13,7 @@ from ..utils import get_nodefrom .filters import ProductFilterSet-class ProductAttributes(graphene.ObjectType):+class SelectedAttribute(graphene.ObjectType):name = graphene.String(default_value=None)value = graphene.String(default_value=None)@@ -21,7 +21,7 @@ class ProductAttributes(graphene.ObjectType):class ProductVariant(CountableDjangoObjectType):stock_quantity = graphene.Int()price_override = graphene.Field(Money)- attributes = graphene.List(ProductAttributes)+ attributes = graphene.List(SelectedAttribute)class Meta:model = models.ProductVariant@@ -52,7 +52,7 @@ class Product(CountableDjangoObjectType):description='The size of a thumbnail, for example 255x255'))availability = graphene.Field(ProductAvailability)price = graphene.Field(Money)- attributes = graphene.List(ProductAttributes)+ attributes = graphene.List(SelectedAttribute)class Meta:model = models.Product@@ -163,7 +163,7 @@ def resolve_instance_attributes(instance, info):name = product_attributes.get(int(k))if v:value = attribute_values.get(int(v))- attribute_list.append(ProductAttributes(name=name, value=value))+ attribute_list.append(SelectedAttribute(name=name, value=value))return attribute_list