The filter widget is pretty dumb, containing a full list of every patch
in the system. We will want to rework this in the future, but for now
just stop generating a stupid big '<select>' and require people fill
this in manually.

Signed-off-by: Stephen Finucane <step...@that.guru>
---
 patchwork/api/filters.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/patchwork/api/filters.py b/patchwork/api/filters.py
index eed7995d..9a8987e9 100644
--- a/patchwork/api/filters.py
+++ b/patchwork/api/filters.py
@@ -22,6 +22,7 @@ from django.core.exceptions import ValidationError
 from django_filters import FilterSet
 from django_filters import IsoDateTimeFilter
 from django_filters import ModelChoiceFilter
+from django_filters import NumberFilter
 from django.forms import ModelChoiceField
 
 from patchwork.models import Bundle
@@ -178,6 +179,10 @@ class CheckFilter(TimestampMixin, FilterSet):
 
 class EventFilter(ProjectMixin, TimestampMixin, FilterSet):
 
+    patch = NumberFilter()
+    series = NumberFilter()
+    cover = NumberFilter()
+
     class Meta:
         model = Event
         fields = ('project', 'category', 'series', 'patch', 'cover')
-- 
2.14.3

_______________________________________________
Patchwork mailing list
Patchwork@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/patchwork

Reply via email to