[System] Fix issue with avatar in userController
This commit is contained in:
parent
57930837ac
commit
4b2cb56fbe
|
@ -98,8 +98,5 @@ def load_avatar(user: User):
|
||||||
|
|
||||||
|
|
||||||
def save_avatar(user, avatar):
|
def save_avatar(user, avatar):
|
||||||
user.avatar_url = ""
|
current_app.config["FG_AUTH_BACKEND"].set_avatar(user, avatar)
|
||||||
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)
|
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
|
|
Loading…
Reference in New Issue