summaryrefslogtreecommitdiff
path: root/archaeological_finds
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2019-01-22 16:44:40 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2019-04-24 19:38:56 +0200
commit2af3c31880b78d1b0110a168a9809c2c48111e40 (patch)
tree5b24e0c2251385e2237c5fed80d7354dceba2943 /archaeological_finds
parent81a1008c26d0cc7cfdcbea14464746a7106d0e85 (diff)
downloadIshtar-2af3c31880b78d1b0110a168a9809c2c48111e40.tar.bz2
Ishtar-2af3c31880b78d1b0110a168a9809c2c48111e40.zip
Manage X, Y, Z fields for context records, operations and sites
Diffstat (limited to 'archaeological_finds')
-rw-r--r--archaeological_finds/models_finds.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py
index 15b6451d6..fce9548ba 100644
--- a/archaeological_finds/models_finds.py
+++ b/archaeological_finds/models_finds.py
@@ -354,6 +354,11 @@ class BaseFind(BulkUpdatedItem, BaseHistorizedItem, OwnPerms):
return find
return
+ def get_town_centroid(self):
+ if self.context_record.town:
+ return self.context_record.town.get_town_centroid()
+ return self.context_record.operation.get_town_centroid()
+
def generate_index(self):
"""
Generate index based on operation or context record (based on