From 46799d5bca1f1d1f43e88e9d34817ae25221063c Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 4 Sep 2025 17:03:52 +0200 Subject: ✨ templates: clean and add fields for operations (refs #6435) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archaeological_context_records/models.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'archaeological_context_records/models.py') diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py index d9bc520f2..21981fc78 100644 --- a/archaeological_context_records/models.py +++ b/archaeological_context_records/models.py @@ -530,6 +530,7 @@ class ContextRecord( RelationItem, ): SLUG = "contextrecord" + ALT_SLUG = "context_record" APP = "archaeological-context-records" MODEL = "context-record" SHOW_URL = "show-contextrecord" @@ -792,6 +793,7 @@ class ContextRecord( HISTORICAL_M2M = ["datings", "documentations", "excavation_technics", "identifications"] CACHED_LABELS = ["cached_label", "cached_periods", "cached_related_context_records"] DOWN_MODEL_UPDATE = ["base_finds"] + GET_VALUES_EXTRA = ValueGetter.GET_VALUES_EXTRA + ["context_record"] QA_LOCK = QuickAction( url="contextrecord-qa-lock", @@ -1080,9 +1082,10 @@ class ContextRecord( no_base_finds = True if "no_base_finds" in kwargs: no_base_finds = kwargs["no_base_finds"] - if prefix and no_base_finds or kwargs.get("force_no_base_finds", True): + if prefix and no_base_finds or kwargs.get("force_no_base_finds", False): return values + kwargs["no_base_finds"] = True if not filtr or prefix + "base_finds" in filtr: values[prefix + "base_finds"] = [ bf.get_values(prefix=prefix, no_values=True, filtr=None, **kwargs) -- cgit v1.2.3