From 677e0868d21b05922f9785797e389524d2123d15 Mon Sep 17 00:00:00 2001 From: Kiril Kovachev Date: Mon, 21 Oct 2024 10:22:30 +0100 Subject: [PATCH] Fix old PFP removal logic --- kanken_online/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kanken_online/__init__.py b/kanken_online/__init__.py index 5925b6c..1a4a6d4 100644 --- a/kanken_online/__init__.py +++ b/kanken_online/__init__.py @@ -60,8 +60,8 @@ def create_app(test_config=None): pfp.save(os.path.join(app.config["PFP_STORE"], stored_filename)) # Remove old PFP - if settings and settings["pfp"]: - os.remove(os.path.join(app.config["PFP_STORE"], stored_filename)) + if settings and settings["pfp_filename"]: + os.remove(os.path.join(app.config["PFP_STORE"], settings["pfp_filename"])) db.execute("UPDATE user_settings SET pfp_filename = ?", (stored_filename,))