Browse Source

Chnange 'status' field in response to 'up'

pull/381/head
James Kirsop 4 years ago
parent
commit
4b1b232959
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      hc/api/models.py

+ 1
- 1
hc/api/models.py View File

@ -241,7 +241,7 @@ class Check(models.Model):
owner=self, new_status__in=("down","up"), created__gt=cutoff owner=self, new_status__in=("down","up"), created__gt=cutoff
).order_by("created") ).order_by("created")
dictStatus = {"up":1,"down":0} dictStatus = {"up":1,"down":0}
result['history'] = list(map(lambda x: {'timestamp':x.created,'status':dictStatus[x.new_status]}, flips))
result['history'] = list(map(lambda x: {'timestamp':x.created,'up':dictStatus[x.new_status]}, flips))
if readonly: if readonly:
result["unique_key"] = self.unique_key result["unique_key"] = self.unique_key
else: else:


Loading…
Cancel
Save