mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-25 17:40:35 +00:00
apply suggested changes
This commit is contained in:
parent
45e82abda4
commit
489f97030e
2 changed files with 2 additions and 2 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -29,4 +29,4 @@
|
|||
nginx/default.conf
|
||||
|
||||
#macOS
|
||||
.DS_Store
|
||||
**/.DS_Store
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue