From: Christian Heller Date: Tue, 17 Jan 2023 23:47:17 +0000 (+0100) Subject: Fix week reset. X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/decks/%7B%7Bprefix%7D%7D/edit?a=commitdiff_plain;h=6115737776cbf6ebd486de1849ea16272cdaff1a;p=misc Fix week reset. --- 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€" \