[System] Fix issue with avatar in userController

This commit is contained in:
Ferdinand Thiessen 2020-11-18 03:17:04 +01:00
parent 57930837ac
commit 4b2cb56fbe
1 changed files with 1 additions and 4 deletions

View File

@ -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()