From 35b0a0fc24aa4e849c0bb76900eb024784e8c1ab Mon Sep 17 00:00:00 2001 From: Roland Geider Date: Wed, 16 Oct 2024 10:58:38 +0200 Subject: [PATCH] Workaround for wger-project/docker/issues/105 --- wger/exercises/api/views.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wger/exercises/api/views.py b/wger/exercises/api/views.py index b139429ab..d6387bb2b 100644 --- a/wger/exercises/api/views.py +++ b/wger/exercises/api/views.py @@ -376,8 +376,10 @@ def search(request): thumbnail = None try: thumbnail = t.get_thumbnail(aliases.get('micro_cropped')).url - except InvalidImageFormatError: - pass + except InvalidImageFormatError as e: + logger.info(f'InvalidImageFormatError while processing a thumbnail: {e}') + except OSError as e: + logger.info(f'OSError while processing a thumbnail: {e}') result_json = { 'value': translation.name,