X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/e9b47e84cb98d20e851047f031292449bdbeb6fe..5c4d4fc7d89af4c95b3a8a9e501f18b628b952b6:/apps/catalogue/models.py diff --git a/apps/catalogue/models.py b/apps/catalogue/models.py index 2097e175f..e85462e7f 100644 --- a/apps/catalogue/models.py +++ b/apps/catalogue/models.py @@ -134,7 +134,7 @@ class Book(models.Model): key = '_short_html_%s' % get_language() short_html = getattr(self, key) - if len(short_html): + if short_html and len(short_html): return mark_safe(short_html) else: tags = self.tags.filter(~Q(category__in=('set', 'theme', 'book'))) @@ -345,7 +345,7 @@ class Fragment(models.Model): def short_html(self): key = '_short_html_%s' % get_language() short_html = getattr(self, key) - if len(short_html): + if short_html and len(short_html): return mark_safe(short_html) else: book_authors = [mark_safe(u'%s' % (tag.get_absolute_url(), tag.name))