diff --git a/sensorsafrica/api/v1/views.py b/sensorsafrica/api/v1/views.py index 6c6a83a..182a446 100644 --- a/sensorsafrica/api/v1/views.py +++ b/sensorsafrica/api/v1/views.py @@ -54,7 +54,7 @@ class NodeView( filter_class = NodeFilter def get_queryset(self): - if self.request.user.is_authenticated(): + if self.request.user.is_authenticated: if self.request.user.groups.filter(name="show_me_everything").exists(): return Node.objects.all() @@ -92,7 +92,7 @@ class PostSensorDataView(mixins.CreateModelMixin, permission_classes = tuple() serializer_class = LastNotifySensorDataSerializer queryset = SensorData.objects.all() - + class VerboseSensorDataView(SensorDataView): filter_class = SensorFilter diff --git a/sensorsafrica/api/v2/views.py b/sensorsafrica/api/v2/views.py index a2a1758..f669a52 100644 --- a/sensorsafrica/api/v2/views.py +++ b/sensorsafrica/api/v2/views.py @@ -248,7 +248,7 @@ class SensorDataView( serializer_class = SensorDataSerializer def get_queryset(self): - if self.request.user.is_authenticated(): + if self.request.user.is_authenticated: if self.request.user.groups.filter(name="show_me_everything").exists(): return SensorData.objects.all()