X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/cda147aa999b09a14dacb097d91638f6b9cca236..6c78d4b8976e413f788ab3db1dc899608b70c7f3:/apps/sponsors/models.py?ds=sidebyside diff --git a/apps/sponsors/models.py b/apps/sponsors/models.py index cbc8d9ba4..fd3c3a925 100644 --- a/apps/sponsors/models.py +++ b/apps/sponsors/models.py @@ -64,7 +64,7 @@ class SponsorPage(models.Model): simg = Image.open(sponsors[sponsor_id].logo.path) if simg.size[0] > THUMB_WIDTH or simg.size[1] > THUMB_HEIGHT: size = ( - min(THUMB_WIDTH, + min(THUMB_WIDTH, simg.size[0] * THUMB_HEIGHT / simg.size[1]), min(THUMB_HEIGHT, simg.size[1] * THUMB_WIDTH / simg.size[0])