From: Radek Czajka Date: Mon, 5 Apr 2021 13:19:44 +0000 (+0200) Subject: Some images have no responsive thumbs. X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/c8e72ddbdf4eb54951b01858cb42ecd35bd5af22 Some images have no responsive thumbs. --- diff --git a/src/references/models.py b/src/references/models.py index c98647191..9246ee322 100644 --- a/src/references/models.py +++ b/src/references/models.py @@ -65,7 +65,8 @@ class Entity(models.Model): result_data['thumbwidth'], result_data['thumbheight'] ] - image_data['responsiveUrls'] = result_data['responsiveUrls'] + if 'responsiveUrls' in result_data: + image_data['responsiveUrls'] = result_data['responsiveUrls'] image_data_list.append(image_data)