X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/0a6491f331f86bec9fe22ad6b0361b496fefb009..070975c3e28093c54fa890962a756e89b5f4d155:/src/catalogue/models/book.py diff --git a/src/catalogue/models/book.py b/src/catalogue/models/book.py index f9f6ac345..c537e5d62 100644 --- a/src/catalogue/models/book.py +++ b/src/catalogue/models/book.py @@ -500,6 +500,13 @@ class Book(models.Model): names = [tag[0] for tag in names] return ', '.join(names) + def publisher(self): + publisher = self.extra_info['publisher'] + if isinstance(publisher, basestring): + return publisher + elif isinstance(publisher, list): + return ', '.join(publisher) + @classmethod def tagged_top_level(cls, tags): """ Returns top-level books tagged with `tags`.