Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Ignore filters with bad values instead of raising an error
Marcin Gębala06867d14706c
diff --git a/saleor/graphql/api.py b/saleor/graphql/api.pyindex 626cbee8ab..b5d2e3cfd6 100644--- a/saleor/graphql/api.py+++ b/saleor/graphql/api.py@@ -118,15 +118,14 @@ class CategoryType(DjangoObjectType):try:attr_pk = attributes_map[attr_name]except KeyError:- raise ValueError("Invalid attribute name: %s" % attr_name)+ attr_pk = Noneelse:try:attr_val_pk = values_map[attr_name][val_slug]except KeyError:- raise ValueError("Invalid attribute value: %s" %- val_slug)+ attr_val_pk = Noneelse:- if attr_pk not in queries:+ if attr_val_pk is not None and attr_pk not in queries:queries[attr_pk] = [attr_val_pk]else:queries[attr_pk].append(attr_val_pk)