summaryrefslogtreecommitdiff
path: root/archaeological_context_records/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2022-08-30 17:49:23 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2022-12-12 12:23:18 +0100
commite4df561285b6fbda6b57477b7fa59ca9168e83e7 (patch)
treee5b754cef2aa2b00739f68dd6ef1bba8f37bef8a /archaeological_context_records/models.py
parent44596cec7f75552a823143ce1a416097cc8ee28c (diff)
downloadIshtar-e4df561285b6fbda6b57477b7fa59ca9168e83e7.tar.bz2
Ishtar-e4df561285b6fbda6b57477b7fa59ca9168e83e7.zip
Fix many count search such has "has-finds" (refs #5425)
Diffstat (limited to 'archaeological_context_records/models.py')
-rw-r--r--archaeological_context_records/models.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py
index e279c55fa..f0a277678 100644
--- a/archaeological_context_records/models.py
+++ b/archaeological_context_records/models.py
@@ -555,7 +555,7 @@ class ContextRecord(
"operation_id": "operation_id",
"unit__label": "unit__label",
}
- MANY_COUNTED_FIELDS = ["base_finds"]
+ MANY_COUNTED_FIELDS = ["base_finds__isnull"]
REVERSED_BOOL_FIELDS = [
"documents__image__isnull",
"documents__associated_file__isnull",
@@ -612,7 +612,7 @@ class ContextRecord(
"parcel__cached_label__iexact",
),
"has_finds": SearchAltName(
- pgettext_lazy("key for text search", "has-finds"), "base_finds"
+ pgettext_lazy("key for text search", "has-finds"), "base_finds__isnull"
),
"cr_relation_types": SearchAltName(
pgettext_lazy("key for text search", "record-relation-type"),