diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2022-03-15 17:05:43 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2022-12-12 12:21:00 +0100 |
commit | 222dac8bce00300a26c8aa7bba99ae7160723946 (patch) | |
tree | 1e48546125087a3b16ff9afcae784461d7f51a97 /ishtar_common/models_common.py | |
parent | b36bd54a551eedb1129e60c3edc558591d417b9a (diff) | |
download | Ishtar-222dac8bce00300a26c8aa7bba99ae7160723946.tar.bz2 Ishtar-222dac8bce00300a26c8aa7bba99ae7160723946.zip |
Geodata: fix search display
Diffstat (limited to 'ishtar_common/models_common.py')
-rw-r--r-- | ishtar_common/models_common.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/ishtar_common/models_common.py b/ishtar_common/models_common.py index a7f9bd2fd..414e63c55 100644 --- a/ishtar_common/models_common.py +++ b/ishtar_common/models_common.py @@ -2132,11 +2132,13 @@ class GeoVectorData(models.Model): name += f" ({str(self.data_type).lower()})" return name - def display_coordinates(self, rounded=5, dim=2, cache=True): - srid = None - profile = get_current_profile() - if profile.display_srs and profile.display_srs.srid: - srid = profile.display_srs.srid + def display_coordinates(self, rounded=5, dim=2, srid=4326, cache=True): + if not srid: + profile = get_current_profile() + if profile.display_srs and profile.display_srs.srid: + srid = profile.display_srs.srid + else: + srid = 4326 return self.get_coordinates(rounded=rounded, srid=srid, dim=dim, cache=cache) def get_coordinates(self, rounded=5, srid: int = None, dim=2, cache=False): |