Merge branch 'main' into production

This commit is contained in:
Mouse Reeve 2020-11-01 11:58:14 -08:00
commit c7b2d7a4b9

View file

@ -115,8 +115,10 @@ def get_book_description(book):
@register.filter(name='text_overflow')
def text_overflow(text):
''' dont' let book descriptions run for ages '''
if not text:
return
char_max = 500
if len(text) < char_max:
if text and len(text) < char_max:
return text
trimmed = text[:char_max]