From 7a91d9a1e2089d4d8aaff11681e9829dc253a3e9 Mon Sep 17 00:00:00 2001 From: Arthur Mitchell Date: Sat, 12 Oct 2024 13:14:58 +0100 Subject: [PATCH] Fix battery.runtime missing crash --- nutcase/app/app/utils/gui_data_format.py | 6 +++--- nutcase/app/config.py | 2 +- nutcase/pip_install_build.sh | 1 + nutcase/pip_install_dev.sh | 1 + 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/nutcase/app/app/utils/gui_data_format.py b/nutcase/app/app/utils/gui_data_format.py index 9ba667b..cc17bd0 100644 --- a/nutcase/app/app/utils/gui_data_format.py +++ b/nutcase/app/app/utils/gui_data_format.py @@ -389,9 +389,9 @@ def Chart_Runtime(UPS, Result): if not (Runtime := format_to_text.Get_NUT_Variable(UPS, 'battery.runtime')): Runtime = 0 - if Runtime: - Runtime_Y.append(float(Runtime) / 60.0) - Runtime_Y.pop(0) + Runtime_Y.append(float(Runtime) / 60.0) + Runtime_Y.pop(0) + Result['runtime_y'] = Runtime_Y session[Target_Device]['runtime_y'] = Runtime_Y diff --git a/nutcase/app/config.py b/nutcase/app/config.py index 2d331de..26ccad5 100755 --- a/nutcase/app/config.py +++ b/nutcase/app/config.py @@ -23,7 +23,7 @@ class Config(object): # region Core info # =================================================================================== APP_NAME = 'NUTCase' - APP_VERSION = '0.4.0.1' + APP_VERSION = '0.4.0.2' UPDATE_HTML = '' GITHUB_API_URL = "https://api.github.com/repos/ArthurMitchell42/nutcase/" diff --git a/nutcase/pip_install_build.sh b/nutcase/pip_install_build.sh index 6380c43..661c9b6 100755 --- a/nutcase/pip_install_build.sh +++ b/nutcase/pip_install_build.sh @@ -9,3 +9,4 @@ pip install -U flake8 pip install -U coverage pip install flask-sqlalchemy pip install flask-migrate +pip install apscheduler diff --git a/nutcase/pip_install_dev.sh b/nutcase/pip_install_dev.sh index 6380c43..661c9b6 100755 --- a/nutcase/pip_install_dev.sh +++ b/nutcase/pip_install_dev.sh @@ -9,3 +9,4 @@ pip install -U flake8 pip install -U coverage pip install flask-sqlalchemy pip install flask-migrate +pip install apscheduler