From d319e01c50deeba74674b9e0a6389f3637ce154a Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 5 Jan 2021 16:57:05 +0100 Subject: Labels: quick access to operation on the container --- archaeological_operations/models.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'archaeological_operations') diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index 8436121a4..246934d91 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -1238,9 +1238,11 @@ class Operation(ClosedItem, DocumentItem, BaseHistorizedItem, values = super(Operation, self).get_values( prefix=prefix, no_values=no_values, filtr=filtr, **kwargs) values = get_values_town_related(self, prefix, values, filtr=filtr) + exclude = kwargs.get("exclude", []) if prefix: return values - if not filtr or prefix + 'context_records' in filtr: + if (not filtr or prefix + 'context_records' in filtr) and \ + prefix + "context_records" not in exclude: kwargs["no_base_finds"] = False values[prefix + 'context_records'] = [ cr.get_values(prefix=prefix, no_values=True, filtr=None, -- cgit v1.2.3