From 4b1b2329594ea47a45b6576ac1da0810f5e48332 Mon Sep 17 00:00:00 2001 From: James Kirsop Date: Fri, 12 Jun 2020 09:16:20 +1000 Subject: [PATCH] Chnange 'status' field in response to 'up' --- hc/api/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hc/api/models.py b/hc/api/models.py index 5271d911..a6f7d462 100644 --- a/hc/api/models.py +++ b/hc/api/models.py @@ -241,7 +241,7 @@ class Check(models.Model): owner=self, new_status__in=("down","up"), created__gt=cutoff ).order_by("created") 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: result["unique_key"] = self.unique_key else: