Update 'suitablephones/views.py'

This commit is contained in:
d0c 2023-01-27 17:25:48 +01:00
parent bc12a30f1c
commit 946a717ff6

View file

@ -13,6 +13,7 @@ class DeviceViewSet(viewsets.ModelViewSet):
queryset = Device.objects.all()
serializer_class = DeviceSerializer
#http://url/api/devices?megapixel=3
def get_queryset(self):
megapixel = self.request.query_params.get('megapixel')
if megapixel: