mirror of
https://github.com/daniviga/bite.git
synced 2024-12-23 00:31:25 +01:00
Fix first and last sample
This commit is contained in:
parent
fe61ebbd9d
commit
b1d0f35cf7
@ -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': {
|
||||
|
Loading…
Reference in New Issue
Block a user