summaryrefslogtreecommitdiff
path: root/archaeological_finds/models_finds.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2020-03-11 13:27:04 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2020-03-11 13:27:04 +0100
commit3fd126b25be6a50c49b4525941d216fa92f727b0 (patch)
treec248b4e8b129d017373af2a07d399f5ca82717b1 /archaeological_finds/models_finds.py
parent9429df335283ff6de8c0e21778bb0e7fbda6b149 (diff)
downloadIshtar-3fd126b25be6a50c49b4525941d216fa92f727b0.tar.bz2
Ishtar-3fd126b25be6a50c49b4525941d216fa92f727b0.zip
Searc criteria: add has image/file/url criteria for all document items
Diffstat (limited to 'archaeological_finds/models_finds.py')
-rw-r--r--archaeological_finds/models_finds.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py
index ad5c803fa..328821386 100644
--- a/archaeological_finds/models_finds.py
+++ b/archaeological_finds/models_finds.py
@@ -880,7 +880,9 @@ class Find(BulkUpdatedItem, ValueGetter, DocumentItem, BaseHistorizedItem,
)
# search parameters
- REVERSED_BOOL_FIELDS = ['documents__image__isnull']
+ REVERSED_BOOL_FIELDS = ['documents__image__isnull',
+ 'documents__associated_url__isnull',
+ 'documents__associated_file__isnull']
BOOL_FIELDS = ['is_complete']
RELATION_TYPES_PREFIX = {
'ope_relation_types':
@@ -1042,10 +1044,6 @@ class Find(BulkUpdatedItem, ValueGetter, DocumentItem, BaseHistorizedItem,
SearchAltName(
pgettext_lazy("key for text search", "checked"),
'checked_type__label__iexact'),
- 'documents__image__isnull':
- SearchAltName(
- pgettext_lazy("key for text search", "has-image"),
- 'documents__image__isnull'),
'container_ref__location':
SearchAltName(
pgettext_lazy("key for text search", "location"),
@@ -1364,6 +1362,7 @@ class Find(BulkUpdatedItem, ValueGetter, DocumentItem, BaseHistorizedItem,
),
}
ALT_NAMES.update(BaseHistorizedItem.ALT_NAMES)
+ ALT_NAMES.update(DocumentItem.ALT_NAMES)
DYNAMIC_REQUESTS = {
'current_division': DynamicRequest(