Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Correct error message
michal09f7940575c8
diff --git a/saleor/product/filters.py b/saleor/product/filters.pyindex 6bb4acfd36..1747ce413d 100644--- a/saleor/product/filters.py+++ b/saleor/product/filters.py@@ -81,7 +81,7 @@ class ProductFilter(FilterSet):def validate_sort_by(self, value):if value.strip('-') not in SORT_BY_FIELDS:raise ValidationError(- ('%s is not an even number' % value)+ ('%s is not a valid sorting option' % value))diff --git a/tests/test_product.py b/tests/test_product.pyindex bb30884c9e..9c4cf58869 100644--- a/tests/test_product.py+++ b/tests/test_product.py@@ -436,4 +436,4 @@ def test_product_filter_sorted_by_wrong_parameter(response = authorized_client.get(url, data)assert 'price' in response.context['filter'].form.fields.keys()assert 'sort_by' in response.context['filter'].form.fields.keys()- assert list(response.context['filter'].qs) == list()+ assert not list(response.context['filter'].qs)