mirror of
https://git.linux-kernel.at/oliver/ivatar.git
synced 2025-11-18 14:08:04 +00:00
Merge branch 'devel' into 'master'
Regression fix (issue #18, #20) Closes #20 See merge request oliver/ivatar!75
This commit is contained in:
@@ -127,7 +127,12 @@ class AvatarImageView(TemplateView):
|
||||
|
||||
if str(default) == 'mm' or str(default) == 'mp':
|
||||
# If mm is explicitly given, we need to catch that
|
||||
pass
|
||||
static_img = path.join('static', 'img', 'mm', '%s%s' % (str(size), '.png'))
|
||||
if not path.isfile(static_img):
|
||||
# We trust this exists!!!
|
||||
static_img = path.join('static', 'img', 'mm', '512.png')
|
||||
# We trust static/ is mapped to /static/
|
||||
return HttpResponseRedirect('/' + static_img)
|
||||
else:
|
||||
return HttpResponseRedirect(default)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user