diff options
| 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 |
| commit | 5b892b087eddf9f4132422259879584c82d1d678 (patch) | |
| tree | 5b24e0c2251385e2237c5fed80d7354dceba2943 /archaeological_finds/models_finds.py | |
| parent | f985a5442260b8aadc78946c606538a55ff063da (diff) | |
| download | Ishtar-5b892b087eddf9f4132422259879584c82d1d678.tar.bz2 Ishtar-5b892b087eddf9f4132422259879584c82d1d678.zip | |
Manage X, Y, Z fields for context records, operations and sites
Diffstat (limited to 'archaeological_finds/models_finds.py')
| -rw-r--r-- | archaeological_finds/models_finds.py | 5 |
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 |
