From 2af3c31880b78d1b0110a168a9809c2c48111e40 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 22 Jan 2019 16:44:40 +0100 Subject: Manage X, Y, Z fields for context records, operations and sites --- archaeological_finds/models_finds.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'archaeological_finds') 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 -- cgit v1.2.3