Skip to content

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

Add filter for limit field

Adam Janik181910afd59d
diff --git a/saleor/graphql/discount/types.py b/saleor/graphql/discount/types.py
index 569d214c0f..177b0a7d9a 100644
--- a/saleor/graphql/discount/types.py
+++ b/saleor/graphql/discount/types.py
@@ -14,7 +14,8 @@ class Voucher(CountableDjangoObjectType):
'type': ['exact'],
'discount_value': ['gte', 'lte'],
'start_date': ['exact'],
- 'end_date': ['exact']}
+ 'end_date': ['exact'],
+ 'limit': ['gte', 'lte']}
model = models.Voucher
diff --git a/saleor/graphql/order/filters.py b/saleor/graphql/order/filters.py
index c28953fb9a..0753ceb4b0 100644
--- a/saleor/graphql/order/filters.py
+++ b/saleor/graphql/order/filters.py
@@ -1,6 +1,5 @@
from django.db.models import Q
-from django_filters import (
- CharFilter, DateFromToRangeFilter, NumberFilter)
+from django_filters import (CharFilter, NumberFilter)
from graphene_django.filter.filterset import GlobalIDMultipleChoiceFilter
from ...order import models