mirror of
https://git.linux-kernel.at/oliver/ivatar.git
synced 2025-11-16 21:18:02 +00:00
Handle case where s= and s=0 as reported in issue #4
This commit is contained in:
@@ -34,8 +34,10 @@ class AvatarImageView(TemplateView):
|
||||
default = request.GET['d']
|
||||
|
||||
if 's' in request.GET:
|
||||
size = request.GET['s']
|
||||
size = int(size)
|
||||
if request.GET['s'] != '' and request.GET['s'] is not None \
|
||||
and request.GET['s'] != '0':
|
||||
size = request.GET['s']
|
||||
size = int(size)
|
||||
if size > int(AVATAR_MAX_SIZE):
|
||||
size = int(AVATAR_MAX_SIZE)
|
||||
if len(kwargs['digest']) == 32:
|
||||
|
||||
Reference in New Issue
Block a user