From f3b1d16958e50143f3ab80b6df6eb01c61e11972 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Fri, 2 Nov 2018 14:56:04 +0100 Subject: [PATCH] misc: fix check for PDF thumbnails support (#27722) --- wcs/qommon/misc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wcs/qommon/misc.py b/wcs/qommon/misc.py index 56d2b8a5b..fd676dc09 100644 --- a/wcs/qommon/misc.py +++ b/wcs/qommon/misc.py @@ -561,8 +561,8 @@ def file_digest(content, chunk_size=100000): def can_thumbnail(content_type): - if content_type == 'application/pdf' and not (HAS_GM and Image): - return False + if content_type == 'application/pdf': + return bool(HAS_GM and Image) if content_type and content_type.startswith('image/'): return bool(Image is not None) return False -- 2.19.1