diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-03-21 15:19:57 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-06-17 13:21:27 +0200 |
commit | 47038917365c6e4de78a8e89e26dce0d2395fe98 (patch) | |
tree | c808c83f4a1689a6df9996371d91aa9572efd63d /archaeological_operations/models.py | |
parent | 9226c46756430608ca458bbcfda453304d9a689a (diff) | |
download | Ishtar-47038917365c6e4de78a8e89e26dce0d2395fe98.tar.bz2 Ishtar-47038917365c6e4de78a8e89e26dce0d2395fe98.zip |
Fix get_town_polygon duplicate code
Diffstat (limited to 'archaeological_operations/models.py')
-rw-r--r-- | archaeological_operations/models.py | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index fbc36dcef..b3e137399 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -395,13 +395,6 @@ class ArchaeologicalSite(DocumentItem, BaseHistorizedItem, QRCodeItem, return return q.all()[0].poly, self._meta.verbose_name - def get_town_polygons(self): - q = self.towns.filter(limit__isnull=False).annotate( - poly=Union('limit')).all() - if not q.count(): - return None - return q.all()[0].poly - def _get_base_image_path(self): return "{}/{}".format(self.SLUG, self.reference) @@ -1135,13 +1128,6 @@ class Operation(ClosedItem, DocumentItem, BaseHistorizedItem, QRCodeItem, return None return q.all()[0].poly, self._meta.verbose_name - def get_town_polygons(self): - q = self.towns.filter(limit__isnull=False).annotate( - poly=Union('limit')).all() - if not q.count(): - return None - return q.all()[0].poly - def context_record_relations_q(self): from archaeological_context_records.models \ import RecordRelations as CRRL |