diff --git a/bookwyrm/templatetags/bookwyrm_tags.py b/bookwyrm/templatetags/bookwyrm_tags.py index 2d95904f..bd14a410 100644 --- a/bookwyrm/templatetags/bookwyrm_tags.py +++ b/bookwyrm/templatetags/bookwyrm_tags.py @@ -171,6 +171,8 @@ def get_next_shelf(current_shelf): @register.filter(name="title") def get_title(book): """ display the subtitle if the title is short """ + if not book: + return "" title = book.title if len(title) < 6 and book.subtitle: title = "{:s}: {:s}".format(title, book.subtitle)