Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Rename type to rateType
Marcin Gębalab6889d387a66
diff --git a/saleor/graphql/core/types/money.py b/saleor/graphql/core/types/money.pyindex 1ce4b8b8bb..0c9339bf88 100644--- a/saleor/graphql/core/types/money.py+++ b/saleor/graphql/core/types/money.py@@ -68,14 +68,14 @@ class VAT(graphene.ObjectType):def resolve_reduced_rates(self, info):reduced_rates = self.data.get('reduced_rates', {}) or {}return [- ReducedRate(rate=rate, type=type)- for type, rate in reduced_rates.items()]+ ReducedRate(rate=rate, rate_type=rate_type)+ for rate_type, rate in reduced_rates.items()]class ReducedRate(graphene.ObjectType):rate = graphene.Float(description='Reduced VAT rate in percent.', required=True)- type = graphene.String(description='A type of goods.', required=True)+ rate_type = graphene.String(description='A type of goods.', required=True)class Meta:description = 'Represents a reduced VAT rate for a particular type of goods.'diff --git a/tests/api/test_core.py b/tests/api/test_core.pyindex e5f3578cbe..cc36305cf1 100644--- a/tests/api/test_core.py+++ b/tests/api/test_core.py@@ -115,7 +115,7 @@ def test_query_tax_rates(admin_api_client, user_api_client, vatlayer):standardRatereducedRates {rate- type+ rateType}}}