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,))