diff --git a/kanken_online/__init__.py b/kanken_online/__init__.py index f84a71f..d926b89 100644 --- a/kanken_online/__init__.py +++ b/kanken_online/__init__.py @@ -56,7 +56,7 @@ def create_app(test_config=None): db.execute("INSERT INTO user_settings (user_id, lang, theme) VALUES (?, ?, ?)", (session["user_id"], form["language"], form["theme"])) - if "pfp" in files: + if "pfp" in files and files["pfp"].filename != "": stored_filename = str(uuid.uuid4()) pfp = files["pfp"] pfp.save(os.path.join(app.config["PFP_STORE"], stored_filename))