From f121e162524ed65d1248006fa4e46ac00cef460d Mon Sep 17 00:00:00 2001 From: rootzoll Date: Wed, 14 Dec 2022 12:09:43 +0100 Subject: [PATCH 1/2] loop thru versions of apps --- app/apps/impl/raspiblitz.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/apps/impl/raspiblitz.py b/app/apps/impl/raspiblitz.py index 78e2cea..a6fe4dc 100644 --- a/app/apps/impl/raspiblitz.py +++ b/app/apps/impl/raspiblitz.py @@ -66,6 +66,10 @@ async def get_app_status_single(self, app_id): if "error" in data.keys(): error = data["error"] + version = "" + if "version" in data.keys(): + version = data["version"] + if data["installed"] == "1": # get basic data status = "online" @@ -92,6 +96,7 @@ async def get_app_status_single(self, app_id): } return { "id": app_id, + "version" : version, "installed": installed, "status": status, "address": address, @@ -105,6 +110,7 @@ async def get_app_status_single(self, app_id): else: return { "id": app_id, + "version" : version, "installed": False, "status": "offline", "error": error, From daa3f90b6dea688f94d54b5482e2f6e46e4437a3 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 14 Dec 2022 11:12:53 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- app/apps/impl/raspiblitz.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/apps/impl/raspiblitz.py b/app/apps/impl/raspiblitz.py index a6fe4dc..944293b 100644 --- a/app/apps/impl/raspiblitz.py +++ b/app/apps/impl/raspiblitz.py @@ -69,7 +69,7 @@ async def get_app_status_single(self, app_id): version = "" if "version" in data.keys(): version = data["version"] - + if data["installed"] == "1": # get basic data status = "online" @@ -96,7 +96,7 @@ async def get_app_status_single(self, app_id): } return { "id": app_id, - "version" : version, + "version": version, "installed": installed, "status": status, "address": address, @@ -110,7 +110,7 @@ async def get_app_status_single(self, app_id): else: return { "id": app_id, - "version" : version, + "version": version, "installed": False, "status": "offline", "error": error,