Fix use of explicit default=mm in params

This commit is contained in:
Oliver Falk
2018-10-10 10:10:22 +02:00
parent 1de1257a42
commit 5557aa4bbf

View File

@@ -90,7 +90,11 @@ class AvatarImageView(TemplateView):
return HttpResponse( return HttpResponse(
data, data,
content_type='image/png') content_type='image/png')
return HttpResponseRedirect(default) if str(default) == 'mm':
# If mm is explicitly given, we need to catch that
pass
else:
return HttpResponseRedirect(default)
static_img = path.join('static', 'img', 'mm', '%s%s' % (str(size), '.png')) static_img = path.join('static', 'img', 'mm', '%s%s' % (str(size), '.png'))
if not path.isfile(static_img): if not path.isfile(static_img):