From ff3809e80d8a1d836a8a19528d087d3c9f44c888 Mon Sep 17 00:00:00 2001 From: d0c Date: Fri, 2 Jun 2023 22:04:16 +0200 Subject: [PATCH] year to do --- suitablephones/views.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/suitablephones/views.py b/suitablephones/views.py index 8481c4e..34063ba 100644 --- a/suitablephones/views.py +++ b/suitablephones/views.py @@ -57,7 +57,11 @@ class DeviceViewSet(viewsets.ModelViewSet): self.queryset = self.queryset.filter(soc__icontains=soc) if version: self.queryset = self.queryset.filter(versions__icontains=version) - #if maintainers: + + #Add year filter + #year = self.request.query_params.get('year') + #if year: + # self.queryset = self.queryset.filter(year__icontains=year) if short_view: self.serializer_class = DeviceSerializerShort self.queryset = self.queryset.filter(maintainers__len__gt=0)