apply suggested changes

This commit is contained in:
Joachim 2021-08-18 10:27:17 +02:00
parent 45e82abda4
commit 489f97030e
2 changed files with 2 additions and 2 deletions

2
.gitignore vendored
View file

@ -29,4 +29,4 @@
nginx/default.conf
#macOS
.DS_Store
**/.DS_Store

View file

@ -54,7 +54,7 @@ def truncatepath(value, arg):
@register.simple_tag(takes_context=False)
def get_book_cover_thumbnail(book, size, ext):
def get_book_cover_thumbnail(book, size="medium", ext="jpg"):
"""Returns a book thumbnail at the specified size and extension, with fallback if needed"""
try:
cover_thumbnail = getattr(book, "cover_bw_book_%s_%s" % (size, ext))