From 7b139ec52e8107d00a164941fa8cc13cfedd5d2d Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 20 Feb 2026 13:47:02 +0100 Subject: ✨ sheet archaeological site - tables for context record from operation or directly link (refs #6623) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archaeological_operations/models.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'archaeological_operations/models.py') diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index f0fa9c325..8401501b3 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -795,6 +795,12 @@ class ArchaeologicalSite( base_finds__context_record__archaeological_site__pk=self.pk ) + @property + def operations_has_cr(self): + q = Operation.objects.filter( + archaeological_sites__id=self.pk, context_record__isnull=False) + return q.exists() + def get_extra_actions(self, request, window_id=None): """ For sheet template -- cgit v1.2.3