diff --git a/bite/telemetry/views.py b/bite/telemetry/views.py index 9abb7e3..916f7be 100644 --- a/bite/telemetry/views.py +++ b/bite/telemetry/views.py @@ -47,9 +47,9 @@ class TelemetrySummaryView(APIView): if count == 0: raise Http404 first = Telemetry.objects.filter( - device__serial=device).order_by('-time')[:1][0] - last = Telemetry.objects.filter( device__serial=device).order_by('time')[:1][0] + last = Telemetry.objects.filter( + device__serial=device).order_by('-time')[:1][0] data = { 'device': device, 'stats': {