summaryrefslogtreecommitdiff
path: root/archaeological_operations/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2025-02-14 17:49:37 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2025-02-19 14:43:48 +0100
commit4f60b4805a7eac04c2a8ec2116a245dbeec3c822 (patch)
tree561f87e11ae60c96320523c80c6317ff8f1d2f99 /archaeological_operations/models.py
parent94f357939957dc8a5de453224913dbecdc4dc9db (diff)
downloadIshtar-4f60b4805a7eac04c2a8ec2116a245dbeec3c822.tar.bz2
Ishtar-4f60b4805a7eac04c2a8ec2116a245dbeec3c822.zip
✨ generate_permissions
manage: - possession (direct, creation, basket) - heritage - areas association - requests ({USER} special syntax)
Diffstat (limited to 'archaeological_operations/models.py')
-rw-r--r--archaeological_operations/models.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py
index 2fafa56ed..9e43f264b 100644
--- a/archaeological_operations/models.py
+++ b/archaeological_operations/models.py
@@ -66,7 +66,6 @@ from ishtar_common.models import (
get_current_profile,
document_attached_changed,
HistoryModel,
- SearchAltName,
GeoItem,
CompleteIdentifierItem,
SearchVectorConfig,
@@ -85,6 +84,7 @@ from ishtar_common.utils import (
mode,
m2m_historization_changed,
post_save_geo,
+ SearchAltName,
SheetItem,
)
@@ -851,6 +851,10 @@ class ArchaeologicalSite(
return actions
@classmethod
+ def get_limit_to_area_query(cls, town_ids):
+ return Q(towns__pk__in=town_ids)
+
+ @classmethod
def _get_query_owns_dicts(cls, ishtaruser, no_rel=False):
profile = ishtaruser.current_profile
town_ids = []
@@ -2309,6 +2313,10 @@ class Operation(
return round(float(self.cost) / self.surface, 2)
@classmethod
+ def get_limit_to_area_query(cls, town_ids):
+ return Q(towns__pk__in=town_ids)
+
+ @classmethod
def _get_query_owns_dicts(cls, ishtaruser, no_rel=False):
profile = ishtaruser.current_profile
town_ids = []