From: Christian Heller Date: Wed, 4 Oct 2023 18:57:03 +0000 (+0200) Subject: Minor calories counter improvement. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D?a=commitdiff_plain;h=d590f1c7a00fad8ac34336ca3751b66335b5055e;p=misc Minor calories counter improvement. --- diff --git a/calories.py b/calories.py index dc40d5f..5ab5704 100644 --- a/calories.py +++ b/calories.py @@ -287,6 +287,7 @@ class MyServer(BaseHTTPRequestHandler): ""\ "" % (k, v.title, v.cals, v.sugar_g, v.standard_g, v.comments, k) consumptions = "" + db.consumptions = sorted(db.consumptions, key=lambda x: db.eatables[x.eatable_key].title) for c in db.consumptions: r = db.calc_consumption(c) consumptions += ""\