From d590f1c7a00fad8ac34336ca3751b66335b5055e Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Wed, 4 Oct 2023 20:57:03 +0200 Subject: [PATCH] Minor calories counter improvement. --- calories.py | 1 + 1 file changed, 1 insertion(+) 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 += ""\ -- 2.30.2