From 4fb7c8b4613fd6d6af5d4d1885ebb762eb3f8f3a Mon Sep 17 00:00:00 2001 From: Maximilian Giller Date: Tue, 7 May 2024 00:03:31 +0200 Subject: [PATCH] Fixed exception on start up --- src/endpoints/handlers/bett.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/endpoints/handlers/bett.py b/src/endpoints/handlers/bett.py index 16a3328..80cec89 100644 --- a/src/endpoints/handlers/bett.py +++ b/src/endpoints/handlers/bett.py @@ -81,6 +81,9 @@ def check_for_change(): logging.info(f"Capacity reached") return + if len(local_history) < 2: + return + global show_scale_countdown global empty_weight latest = local_history[-1]