fixes
[wolnelektury.git] / src / catalogue / views.py
index a56286d..e754e05 100644 (file)
@@ -214,6 +214,8 @@ class TaggedObjectList(BookList):
         super().analyse()
 
         self.ctx['tags'] = analyse_tags(self.request, self.kwargs['tags'])
+        if len(self.ctx['tags']) > 4:
+            raise Http404
         self.ctx.update({
             'fragment_tags': [],
             'work_tags': [],
@@ -240,6 +242,7 @@ class TaggedObjectList(BookList):
         ]
         if len(self.ctx['tags']) == 1 and self.ctx['main_tag'] is not None and self.ctx['main_tag'].category == 'author':
             self.ctx['translation_list'] = self.ctx['main_tag'].book_set.all()
+            self.ctx['narrated'] = self.ctx['main_tag'].narrated.all()
 
     def get_queryset(self):
         if self.ctx['work_tags']: