]> git.parisson.com Git - teleforma.git/commitdiff
Change accepted ratio
authoryleclanche <yoan.leclanche@gmail.com>
Thu, 19 Sep 2019 09:22:02 +0000 (11:22 +0200)
committerGael Le Mignot <gael@pilotsystems.net>
Wed, 2 Oct 2019 14:30:19 +0000 (16:30 +0200)
teleforma/forms.py

index f7f06072cde7952dac4d5e3961d6781ed68b57b1..05eb516d6e3659d7877ddd92e29761bdee070e03 100644 (file)
@@ -102,7 +102,7 @@ class UserForm(ModelForm):
             return image
         width, height = get_image_dimensions(image)
         ratio = float(height) / float(width)
-        if ratio > 1.5 or ratio < 1:
+        if ratio > 2.5 or ratio < 1:
             raise ValidationError({'portrait': "L'image n'est pas au format portrait."})
         NEW_HEIGHT = 256
         NEW_WIDTH = 200