--- a/src/pyams_file/thumbnail.py Mon Feb 18 16:11:42 2019 +0100
+++ b/src/pyams_file/thumbnail.py Tue Mar 26 16:41:05 2019 +0100
@@ -255,8 +255,9 @@
if ':' in thumbnail_name:
selection_name, thumbnail_name = thumbnail_name.split(':', 1)
selection = thumbnails.get_selection(selection_name, format)
- transaction.commit()
- thumbnails = IThumbnails(selection)
+ if selection is not None:
+ transaction.commit()
+ thumbnails = IThumbnails(selection)
result = thumbnails.get_thumbnail(thumbnail_name, format)
transaction.commit()
return result