diff --git a/frigate/stats/util.py b/frigate/stats/util.py index 17b45d1d4..410350d96 100644 --- a/frigate/stats/util.py +++ b/frigate/stats/util.py @@ -42,11 +42,10 @@ def get_latest_version(config: FrigateConfig) -> str: "https://api.github.com/repos/blakeblackshear/frigate/releases/latest", timeout=10, ) + response = request.json() except (RequestException, JSONDecodeError): return "unknown" - response = request.json() - if request.ok and response and "tag_name" in response: return str(response.get("tag_name").replace("v", "")) else: