X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/eaba19e725b49fdf4efc858604a7b9d70d27f59f..f4e9d89859fd521ec9eeb1f94f9caa374ef86960:/src/catalogue/views.py diff --git a/src/catalogue/views.py b/src/catalogue/views.py index d563b68a6..95298897c 100644 --- a/src/catalogue/views.py +++ b/src/catalogue/views.py @@ -284,9 +284,12 @@ class TaggedObjectList(BookList): qs = Book.tagged.with_all(self.ctx['work_tags']).filter(findable=True) qs = qs.exclude(ancestor__in=qs) if self.is_themed: - qs = Fragment.tagged.with_all(self.ctx['fragment_tags']).filter( - Q(book__in=qs) | Q(book__ancestor__in=qs) - ) + fqs = Fragment.tagged.with_all(self.ctx['fragment_tags']) + if self.ctx['work_tags']: + fqs = fqs.filter( + Q(book__in=qs) | Q(book__ancestor__in=qs) + ) + qs = fqs return qs def get_suggested_tags(self, queryset): @@ -567,8 +570,6 @@ def book_detail(request, slug): 'club_form': ScheduleForm() if book.preview else None, 'club': Club.objects.first() if book.preview else None, 'donation_form': DonationStep1Form(), - - 'EXPERIMENTS_SWITCHABLE_layout': True, })