diff options
Diffstat (limited to 'archaeological_operations/models.py')
-rw-r--r-- | archaeological_operations/models.py | 10 |
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 = [] |