diff options
| author | QuentinAndre <quentin.andre@imt-atlantique.net> | 2021-07-16 07:27:00 +0200 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2021-09-01 12:36:46 +0200 | 
| commit | 57cb006e6fcafc67dd4a8423cb3d273bdd14a18b (patch) | |
| tree | b1d40ae2741abb87010c5f87bd975e2e260b7d2b /ishtar_common/models_common.py | |
| parent | 35e60eeb73d0b0cdd764b027a44e8515fd69c6c1 (diff) | |
| download | Ishtar-57cb006e6fcafc67dd4a8423cb3d273bdd14a18b.tar.bz2 Ishtar-57cb006e6fcafc67dd4a8423cb3d273bdd14a18b.zip | |
get_geo_items for operations and tests
Diffstat (limited to 'ishtar_common/models_common.py')
| -rw-r--r-- | ishtar_common/models_common.py | 7 | 
1 files changed, 5 insertions, 2 deletions
| diff --git a/ishtar_common/models_common.py b/ishtar_common/models_common.py index a58ec37ab..fcd252577 100644 --- a/ishtar_common/models_common.py +++ b/ishtar_common/models_common.py @@ -2875,8 +2875,11 @@ class GeoItem(models.Model):                      self.multi_polygon.centroid, rounded                  )              else: -                x, y = self.display_coordinates -                dict["geometry"]["coordinates"] = [x, y] +                try: +                    x, y = self.display_coordinates +                    dict["geometry"]["coordinates"] = [x, y] +                except ValueError: +                    dict["geometry"]["coordinates"] = []          return dict      def convert_coordinates(self, point_2d, rounded): | 
