From 06bea53e43e9404b41bfa648da9f012ea9e69f45 Mon Sep 17 00:00:00 2001 From: Jonathan Perret Date: Thu, 26 Sep 2024 14:06:24 +0200 Subject: [PATCH] Update src/main/python/main/ayab/version_checker.py Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- src/main/python/main/ayab/version_checker.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/python/main/ayab/version_checker.py b/src/main/python/main/ayab/version_checker.py index 00fa767f..8ead1811 100644 --- a/src/main/python/main/ayab/version_checker.py +++ b/src/main/python/main/ayab/version_checker.py @@ -54,8 +54,8 @@ def version_check_finished(self) -> None: data = self._version_check_reply.readAll() obj = json.loads(data.data()) - if obj["draft"] is False and obj["prerelease"] is False: - latest_version = obj["tag_name"] + if not obj.get("draft", True) and not obj.get("prerelease", True): + latest_version = obj.get("tag_name") if latest_version is not None and self.is_newer(latest_version): url = ( f"https://github.com/{self.REPO}/releases/tag/{latest_version}"