From c8e72ddbdf4eb54951b01858cb42ecd35bd5af22 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Mon, 5 Apr 2021 15:19:44 +0200 Subject: [PATCH] Some images have no responsive thumbs. --- src/references/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- 2.20.1