mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-24 17:10:31 +00:00
Fixes error in cover alt text templateteag
This commit is contained in:
parent
d8aadb4587
commit
29477c24f4
1 changed files with 3 additions and 1 deletions
|
@ -121,8 +121,10 @@ def get_boosted(boost):
|
||||||
@register.filter(name='edition_info')
|
@register.filter(name='edition_info')
|
||||||
def get_edition_info(book):
|
def get_edition_info(book):
|
||||||
''' paperback, French language, 1982 '''
|
''' paperback, French language, 1982 '''
|
||||||
|
if not book:
|
||||||
|
return
|
||||||
items = [
|
items = [
|
||||||
book.physical_format,
|
book.physical_format if isinstance(book, models.Edition) else None,
|
||||||
book.languages[0] + ' language' if book.languages and \
|
book.languages[0] + ' language' if book.languages and \
|
||||||
book.languages[0] != 'English' else None,
|
book.languages[0] != 'English' else None,
|
||||||
str(book.published_date.year) if book.published_date else None,
|
str(book.published_date.year) if book.published_date else None,
|
||||||
|
|
Loading…
Reference in a new issue