summaryrefslogtreecommitdiff
path: root/archaeological_context_records/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_context_records/models.py')
-rw-r--r--archaeological_context_records/models.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py
index d1b1fb147..6b6f0f039 100644
--- a/archaeological_context_records/models.py
+++ b/archaeological_context_records/models.py
@@ -440,8 +440,9 @@ class ContextRecord(
"documents__associated_file__isnull",
"documents__associated_url__isnull",
]
- NUMBER_FIELDS = ["operation__year", "operation__operation_code", "datings__start_date",
- "datings__end_date"] + GeographicSubTownItem.NUMBER_FIELDS
+ NUMBER_FIELDS = [
+ "operation__year", "operation__operation_code"
+ ] + GeographicSubTownItem.NUMBER_FIELDS + BaseDating.NUMBER_FIELDS
RELATION_TYPES_PREFIX = {
"ope_relation_types": "operation__",
@@ -486,9 +487,9 @@ class ContextRecord(
pgettext_lazy("key for text search", "operation-relation-type"),
"ope_relation_types",
),
- "datings__period": SearchAltName(
+ "period": SearchAltName(
pgettext_lazy("key for text search", "period"),
- "datings__period__label__iexact",
+ "periods__label__iexact",
),
"unit": SearchAltName(
pgettext_lazy("key for text search", "unit-type"), "unit__label__iexact"
@@ -573,6 +574,7 @@ class ContextRecord(
ALT_NAMES.update(Dating.ASSOCIATED_ALT_NAMES)
ALT_NAMES.update(GeoItem.ALT_NAMES)
ALT_NAMES.update(Imported.ALT_NAMES)
+ ALT_NAMES.update(BaseDating.ALT_NAMES)
DEFAULT_SEARCH_FORM = ("archaeological_context_records.forms", "RecordSelect")