aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2018-12-25 20:26:36 +0000
committerrubenwardy <rw@rubenwardy.com>2018-12-25 20:26:36 +0000
commitd44178cb0c6fc45d9decff7e766593f4ab2b3747 (patch)
treea0a0ac5464940bd7ee2d217e8cee0bfec3792049
parentc926a812d341b3efb7d22f2b339be2f2d9cc7029 (diff)
downloadcheatdb-d44178cb0c6fc45d9decff7e766593f4ab2b3747.tar.xz
Fix relative links again
-rw-r--r--app/tasks/forumtasks.py9
1 files 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: