summaryrefslogtreecommitdiff
path: root/archaeological_operations/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2026-02-20 13:47:02 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2026-02-23 11:26:43 +0100
commit7b139ec52e8107d00a164941fa8cc13cfedd5d2d (patch)
tree91e2039884dd9990cc62b57c89db6087212c9144 /archaeological_operations/models.py
parent3a51b7b0d31b99061541ac71ea7da48735ba8a32 (diff)
downloadIshtar-7b139ec52e8107d00a164941fa8cc13cfedd5d2d.tar.bz2
Ishtar-7b139ec52e8107d00a164941fa8cc13cfedd5d2d.zip
✨ sheet archaeological site - tables for context record from operation or directly link (refs #6623)
Diffstat (limited to 'archaeological_operations/models.py')
-rw-r--r--archaeological_operations/models.py6
1 files changed, 6 insertions, 0 deletions
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