fnp
/
wolnelektury.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
243ac5a
)
fix
author
Radek Czajka
<rczajka@rczajka.pl>
Tue, 13 Jun 2023 21:36:43 +0000
(23:36 +0200)
committer
Radek Czajka
<rczajka@rczajka.pl>
Tue, 13 Jun 2023 21:36:43 +0000
(23:36 +0200)
src/catalogue/views.py
patch
|
blob
|
history
diff --git
a/src/catalogue/views.py
b/src/catalogue/views.py
index
0bca7d8
..
9529889
100644
(file)
--- 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 = 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):
return qs
def get_suggested_tags(self, queryset):