mirror of
https://git.linux-kernel.at/oliver/ivatar.git
synced 2025-11-17 05:28:03 +00:00
Fix issue #17
This commit is contained in:
@@ -54,7 +54,12 @@ class AvatarImageView(TemplateView):
|
||||
sizetemp = request.GET['size']
|
||||
if sizetemp:
|
||||
if sizetemp != '' and sizetemp is not None and sizetemp != '0':
|
||||
size = int(sizetemp)
|
||||
try:
|
||||
size = int(sizetemp)
|
||||
# Should we receive something we cannot convert to int, leave
|
||||
# the user with the default value of 80
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
if size > int(AVATAR_MAX_SIZE):
|
||||
size = int(AVATAR_MAX_SIZE)
|
||||
|
||||
Reference in New Issue
Block a user