We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f717d52 commit 2504affCopy full SHA for 2504aff
sensorsafrica/api/v2/views.py
@@ -160,6 +160,9 @@ def list(self, request):
160
stats = (
161
SensorDataValue.objects.filter(
162
Q(sensordata__sensor__node=last_active.node.id),
163
+ # Open endpoints should return data from public sensors
164
+ # only.
165
+ Q(sensordata__sensor__public=True),
166
Q(sensordata__location=last_active.location.id),
167
Q(sensordata__timestamp__gte=last_5_mins),
168
Q(sensordata__timestamp__lte=last_data_received_at),
0 commit comments