X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/cda147aa999b09a14dacb097d91638f6b9cca236..e086b48a37bcbcc7d19890b5954ec93213440b32:/apps/sponsors/models.py?ds=inline 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])