From a49c96fd16f6c263c326f12f20eb407d2c05be36 Mon Sep 17 00:00:00 2001 From: Oliver Falk Date: Fri, 2 Aug 2019 15:25:40 +0200 Subject: [PATCH] Fix situation where we get a float --- ivatar/ivataraccount/views.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ivatar/ivataraccount/views.py b/ivatar/ivataraccount/views.py index d11ac64..020390e 100644 --- a/ivatar/ivataraccount/views.py +++ b/ivatar/ivataraccount/views.py @@ -695,10 +695,10 @@ class CropPhotoView(TemplateView): ''' photo = self.model.objects.get(pk=kwargs['pk'], user=request.user) # pylint: disable=no-member dimensions = { - 'x': int(request.POST['x']), - 'y': int(request.POST['y']), - 'w': int(request.POST['w']), - 'h': int(request.POST['h']) + 'x': int(float(request.POST['x'])), + 'y': int(float(request.POST['y'])), + 'w': int(float(request.POST['w'])), + 'h': int(float(request.POST['h'])), } email = openid = None if 'email' in request.POST: