From 6115737776cbf6ebd486de1849ea16272cdaff1a Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Wed, 18 Jan 2023 00:47:17 +0100 Subject: [PATCH] Fix week reset. --- income_progress_bars.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/income_progress_bars.py b/income_progress_bars.py index 48b1179..8a85a4c 100644 --- a/income_progress_bars.py +++ b/income_progress_bars.py @@ -1,4 +1,3 @@ -# Python 3 server example from http.server import BaseHTTPRequestHandler, HTTPServer import os import json @@ -215,7 +214,9 @@ class MyServer(BaseHTTPRequestHandler): success = success_income + 0 diff_goal = earned - goal if time_progress >= 0: - success = success_income / time_progress + success = 1 + if time_progress > 0: + success = success_income / time_progress time_progress_indicator = "
" % int(time_progress * 100) return "%s" \ "%.2f€" \ -- 2.30.2