From 4b2cb56fbe875e191f4dd34d347e82ed38fa82b4 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Wed, 18 Nov 2020 03:17:04 +0100 Subject: [PATCH] [System] Fix issue with avatar in userController --- flaschengeist/controller/userController.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/flaschengeist/controller/userController.py b/flaschengeist/controller/userController.py index 910951e..77615ba 100644 --- a/flaschengeist/controller/userController.py +++ b/flaschengeist/controller/userController.py @@ -98,8 +98,5 @@ def load_avatar(user: User): def save_avatar(user, avatar): - user.avatar_url = "" - r = current_app.config["FG_AUTH_BACKEND"].set_avatar(user, avatar) - if not user.avatar_url: - user.avatar_url = url_for("users.get_avatar", userid=user.userid) + current_app.config["FG_AUTH_BACKEND"].set_avatar(user, avatar) db.session.commit()