# HG changeset patch # User Thierry Florac # Date 1553614865 -3600 # Node ID 50a5119ee57d61ea50691d085e672e9a859c3524 # Parent a9225c2f8870371f5f45e3bd2d70d77c474c22bf Handle unsupported selections in thumbnails traverser diff -r a9225c2f8870 -r 50a5119ee57d src/pyams_file/thumbnail.py --- 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