mirror of
https://github.com/daniviga/bite.git
synced 2024-11-22 21:16:12 +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