From 204e14877d5ee547ba35cdc4f416a5b16fbaaa82 Mon Sep 17 00:00:00 2001 From: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat, 17 Dec 2022 19:49:00 -0800 Subject: [PATCH 1/2] fix excluded items not showing in tag dropdown count --- .../filterable-dropdown/filterable-dropdown.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.html b/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.html index 9ce3c8da2..e82d17334 100644 --- a/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.html +++ b/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.html @@ -4,7 +4,7 @@
 {{title}}
- + From 94e32005ca1e4f862be062c91e21ff90daf4d914 Mon Sep 17 00:00:00 2001 From: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat, 17 Dec 2022 19:49:17 -0800 Subject: [PATCH 2/2] support `tags__id__none` for advanced search --- src/documents/index.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/documents/index.py b/src/documents/index.py index fe40dc1a8..e9c340697 100644 --- a/src/documents/index.py +++ b/src/documents/index.py @@ -143,6 +143,9 @@ class DelayedQuery: elif k == "tags__id__all": for tag_id in v.split(","): criterias.append(query.Term("tag_id", tag_id)) + elif k == "tags__id__none": + for tag_id in v.split(","): + criterias.append(query.Not(query.Term("tag_id", tag_id))) elif k == "document_type__id": criterias.append(query.Term("type_id", v)) elif k == "correspondent__isnull":