From: Jan Szejko Date: Thu, 14 Dec 2017 08:43:33 +0000 (+0100) Subject: Merge branch 'api' X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/63f861861578b33416a0b2d801252b27443fabde Merge branch 'api' --- 63f861861578b33416a0b2d801252b27443fabde diff --cc src/catalogue/models/book.py index 02278de67,00921b899..140ba50f9 --- a/src/catalogue/models/book.py +++ b/src/catalogue/models/book.py @@@ -119,11 -122,8 +122,11 @@@ class Book(models.Model) else: return ', '.join(self.tags.filter(category=category).values_list('name', flat=True)) + def tags_by_category(self): + return split_tags(self.tags.exclude(category__in=('set', 'theme'))) + def author_unicode(self): - return self.tag_unicode('author') + return self.cached_author def translator(self): translators = self.extra_info.get('translators')