X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/340b7f2a6d8a552399511cc87747d1223df48ec0..7fdf8249c9c016e397edc3112184e74b0f3f9778:/apps/sponsors/models.py 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])