From 053f0d3721dba4909d02f5ee31111b58e5e72313 Mon Sep 17 00:00:00 2001 From: TiffanyBrugger Date: Fri, 24 Jul 2026 14:48:48 +0000 Subject: [PATCH] =?UTF-8?q?Dashboard=20setzt=20Session-Daten=20beim=20Star?= =?UTF-8?q?t=20automatisch=20zur=C3=BCck?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dashboard.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dashboard.py b/dashboard.py index 705c3dc..d00b5d2 100644 --- a/dashboard.py +++ b/dashboard.py @@ -24,6 +24,11 @@ def speichere_fuellwoerter(woerter): with open(FUELLWOERTER_DATEI, "w", encoding="utf-8") as f: json.dump(woerter, f, ensure_ascii=False, indent=2) +def reset_session_daten(): + with open(DATEN_DATEI, "w", encoding="utf-8") as f: + json.dump({"status": "wartend", "sessions": [], "fehler": None}, f, ensure_ascii=False, indent=2) + print("--- Dashboard gestartet – Session-Daten zurückgesetzt ---") + @app.route("/") def index(): daten = lade_daten() @@ -65,4 +70,5 @@ def fuellwort_entfernen(wort): return redirect(url_for("index")) if __name__ == "__main__": + reset_session_daten() app.run(host="0.0.0.0", port=5000, debug=True, threaded=True)