Browse Source

Fix a "invalid time format" in front.views.status_single on Windows hosts. Fixes #224

pull/226/head
Pēteris Caune 6 years ago
parent
commit
100bc3c5e7
No known key found for this signature in database GPG Key ID: E28D7679E9A9EDE2
3 changed files with 3 additions and 2 deletions
  1. +1
    -0
      CHANGELOG.md
  2. +1
    -1
      hc/front/tests/test_status_single.py
  3. +1
    -1
      hc/front/views.py

+ 1
- 0
CHANGELOG.md View File

@ -10,6 +10,7 @@ All notable changes to this project will be documented in this file.
### Bug Fixes
- Fix refreshing of the checks page filtered by tags (#221)
- Escape asterisks in Slack messages (#223)
- Fix a "invalid time format" in front.views.status_single on Windows hosts
## 1.5.0 - 2019-02-04


+ 1
- 1
hc/front/tests/test_status_single.py View File

@ -29,7 +29,7 @@ class StatusSingleTestCase(BaseTestCase):
doc = r.json()
self.assertEqual(doc["status"], "up")
self.assertEqual(doc["updated"], p.created.strftime("%s.%f"))
self.assertEqual(doc["updated"], str(p.created.timestamp()))
self.assertTrue("test-user-agent" in doc["events"])
def test_it_omits_events(self):


+ 1
- 1
hc/front/views.py View File

@ -494,7 +494,7 @@ def status_single(request, code):
events = _get_events(check, 20)
updated = "1"
if len(events):
updated = events[0].created.strftime("%s.%f")
updated = str(events[0].created.timestamp())
doc = {
"status": status,


Loading…
Cancel
Save