mirror of
https://github.com/mtan93/cachet-url-monitor.git
synced 2026-03-08 05:31:58 +00:00
Return status as integer (#63)
During the first start the if statement on line 237 does not get evaluated correctly and will not "return" Therefore by any restart the first evaluation triggers a update even if the original status is same.
This commit is contained in:
@@ -60,7 +60,7 @@ def get_current_status(endpoint_url, component_id, headers):
|
||||
|
||||
if get_status_request.ok:
|
||||
# The component exists.
|
||||
return get_status_request.json()['data']['status']
|
||||
return int(get_status_request.json()['data']['status'])
|
||||
else:
|
||||
raise ComponentNonexistentError(component_id)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user