Skip to content

Commit

Permalink
Manage Images: Do not display thumbnail for PDF
Browse files Browse the repository at this point in the history
  • Loading branch information
Maffooch committed Sep 17, 2024
1 parent a643544 commit e1683bc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dojo/templatetags/display_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@
"mark_finding_duplicate": "Mark as duplicate",
}

supported_file_formats = [
supported_thumbnail_file_formats = [
"apng", "avif", "gif", "jpg",
"jpeg", "jfif", "pjpeg", "pjp",
"png", "svg", "webp", "pdf",
"png", "svg", "webp",
]


Expand Down Expand Up @@ -860,7 +860,7 @@ def jira_change(obj):
def get_thumbnail(file):
from pathlib import Path
file_format = Path(file.file.url).suffix[1:]
return file_format in supported_file_formats
return file_format in supported_thumbnail_file_formats


@register.filter
Expand Down

0 comments on commit e1683bc

Please sign in to comment.