X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/2856ae6ae36213ca7997366e0c7790e3c855e62f..c7c0b88f1f628f0498c8c53c76a061ec128a228a:/apps/catalogue/models/book.py diff --git a/apps/catalogue/models/book.py b/apps/catalogue/models/book.py index 0438afa21..c865d1d87 100644 --- a/apps/catalogue/models/book.py +++ b/apps/catalogue/models/book.py @@ -495,7 +495,7 @@ class Book(models.Model): book = self rel_info = book.related_info() names = [(related_tag_name(tag), Tag.create_url('author', tag['slug'])) - for tag in rel_info['tags']['author']] + for tag in rel_info['tags'].get('author', ())] if 'parents' in rel_info: books = [(name, Book.create_url(slug)) for name, slug in rel_info['parents']]