Return nobody instead of misteryman - as pointed out in issue #18 (fixed)

This commit is contained in:
Oliver Falk
2018-11-16 10:51:08 +01:00
parent c3ed5fb014
commit 0d404dc559

View File

@@ -127,10 +127,10 @@ class AvatarImageView(TemplateView):
else: else:
return HttpResponseRedirect(default) return HttpResponseRedirect(default)
static_img = path.join('static', 'img', 'mm', '%s%s' % (str(size), '.png')) static_img = path.join('static', 'img', 'nobody', '%s%s' % (str(size), '.png'))
if not path.isfile(static_img): if not path.isfile(static_img):
# We trust this exists!!! # We trust this exists!!!
static_img = path.join('static', 'img', 'mm', '512.png') static_img = path.join('static', 'img', 'nobody', '512.png')
# We trust static/ is mapped to /static/ # We trust static/ is mapped to /static/
return HttpResponseRedirect('/' + static_img) return HttpResponseRedirect('/' + static_img)