Fix old PFP removal logic
This commit is contained in:
parent
e00c9fe431
commit
677e0868d2
@ -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,))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user