misc: fix check for PDF thumbnails support (#27722)

This commit is contained in:
Frédéric Péters 2018-11-02 14:56:04 +01:00
parent 9719d0ade6
commit 7d05ea914f
1 changed files with 2 additions and 2 deletions

View File

@ -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