X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/68dbe44bdbc497a82064c6a47eeaecbb34463f64..e97becbbb360b14527801bfc22c3e1ab3fd288a1:/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])