summaryrefslogtreecommitdiff
path: root/archaeological_context_records/models.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_context_records/models.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_context_records/models.py')
-rw-r--r--archaeological_context_records/models.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py
index 9b1483e0d..02b074706 100644
--- a/archaeological_context_records/models.py
+++ b/archaeological_context_records/models.py
@@ -362,6 +362,11 @@ class ContextRecord(BulkUpdatedItem, DocumentItem, BaseHistorizedItem,
'operation_id': 'operation_id',
'unit__label': "unit__label"
}
+ REVERSED_BOOL_FIELDS = [
+ 'documents__image__isnull',
+ 'documents__associated_file__isnull',
+ 'documents__associated_url__isnull',
+ ]
RELATION_TYPES_PREFIX = {'ope_relation_types': 'operation__',
'cr_relation_types': ''}
# alternative names of fields for searches
@@ -416,6 +421,7 @@ class ContextRecord(BulkUpdatedItem, DocumentItem, BaseHistorizedItem,
),
}
ALT_NAMES.update(BaseHistorizedItem.ALT_NAMES)
+ ALT_NAMES.update(DocumentItem.ALT_NAMES)
PARENT_ONLY_SEARCH_VECTORS = ["operation", "archaeological_site", "parcel"]
BASE_SEARCH_VECTORS = [