Self hosted FLOSS fitness/workout, nutrition and weight tracker
Also log the image id when an error occurs while generating thumbnails
Roland Geiderf8922a5b0c7c
diff --git a/wger/exercises/api/views.py b/wger/exercises/api/views.pyindex 5739904b3..fb63a5b33 100644--- a/wger/exercises/api/views.py+++ b/wger/exercises/api/views.py@@ -304,9 +304,14 @@ def search(request):try:thumbnail = t.get_thumbnail(aliases.get('micro_cropped')).urlexcept InvalidImageFormatError as e:- logger.warning(f'InvalidImageFormatError while processing a thumbnail: {e}')+ logger.warning(+ f'InvalidImageFormatError while processing thumbnails for '+ f'image ID {image_obj.id}: {e}'+ )except OSError as e:- logger.warning(f'OSError while processing a thumbnail: {e}')+ logger.warning(+ f'OSError while processing thumbnails for image ID {image_obj.id}: {e}'+ )result_json = {'value': translation.name,