changeset f355f5479fc3 in trytond:6.0
details: https://hg.tryton.org/trytond?cmd=changeset&node=f355f5479fc3
description:
        Support avatar of size 2048

        issue10543
        review352261002
        (grafted from 70b728cf044936ac1d7f6c1f644397dbc9f4e932)
diffstat:

 trytond/ir/avatar.py |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r e456a849dea0 -r f355f5479fc3 trytond/ir/avatar.py
--- a/trytond/ir/avatar.py      Wed Jul 21 08:13:42 2021 +0200
+++ b/trytond/ir/avatar.py      Wed Jul 07 00:44:40 2021 +0200
@@ -85,7 +85,7 @@
                 2 ** math.ceil(math.log2(size)),
                 10 * math.ceil(size / 10) if size <= 100
                 else 50 * math.ceil(size / 50)))
-        if not (0 < size < 2048):
+        if not (0 < size <= 2048):
             raise ValueError("Invalid size")
         for avatar in self.cache:
             if avatar.size == size:
@@ -155,7 +155,7 @@
         "Size", required=True,
         domain=[
             ('size', '>', 0),
-            ('size', '<', 2048),
+            ('size', '<=', 2048),
             ])
 
     @classmethod

Reply via email to