File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 1+ from logging import getLogger
12from pathlib import Path
23
34from django .conf import settings
89from finder .models .file import AbstractFileModel
910
1011
12+ logger = getLogger (__name__ )
13+
1114GravityChoices = {
1215 '' : "Center" ,
1316 'n' : "North" ,
@@ -44,8 +47,8 @@ def get_thumbnail_url(self, realm):
4447 if not realm .sample_storage .exists (thumbnail_path ):
4548 try :
4649 self .crop (realm , thumbnail_path , self .thumbnail_size , self .thumbnail_size )
47- except Exception :
48- # no thumbnail image could not be created
50+ except Exception as exception :
51+ logger . warning ( f"Thumbnail generation failed for image { self . pk } : { exception } " )
4952 return self .fallback_thumbnail_url
5053 return realm .sample_storage .url (thumbnail_path )
5154
You can’t perform that action at this time.
0 commit comments