From d44178cb0c6fc45d9decff7e766593f4ab2b3747 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Tue, 25 Dec 2018 20:26:36 +0000 Subject: [PATCH] Fix relative links again --- app/tasks/forumtasks.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/tasks/forumtasks.py b/app/tasks/forumtasks.py index 05f6006..85d4b09 100644 --- a/app/tasks/forumtasks.py +++ b/app/tasks/forumtasks.py @@ -49,9 +49,14 @@ def checkForumAccount(username, forceNoSave=False): needsSaving = True pic = profile.avatar - if pic and not "http" in pic: - needsSaving = needsSaving or pic != user.profile_pic + if pic and "http" in pic: + pic = None + + needsSaving = needsSaving or pic != user.profile_pic + if pic: user.profile_pic = "https://forum.minetest.net/" + pic + else: + user.profile_pic = None # Save if needsSaving and not forceNoSave: