diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-02-19 20:12:56 +0100 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-04-24 19:38:56 +0200 | 
| commit | 670ce3fb9c575dbac398a4887f749504a1f73088 (patch) | |
| tree | a25c51fe15544468460b93825f8b12d926c05de9 /ishtar_common/models.py | |
| parent | eb5c5b81bb4586eaadf408c4c95eca2ee26e9e6e (diff) | |
| download | Ishtar-670ce3fb9c575dbac398a4887f749504a1f73088.tar.bz2 Ishtar-670ce3fb9c575dbac398a4887f749504a1f73088.zip | |
Geom: fi x, y overload by form - geo tests
Diffstat (limited to 'ishtar_common/models.py')
| -rw-r--r-- | ishtar_common/models.py | 7 | 
1 files changed, 4 insertions, 3 deletions
| diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 28e469e31..9dd90de65 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -3085,10 +3085,11 @@ class Town(Imported, models.Model):      def generate_area(self, force=False):          if not force and (self.surface or not self.limit):              return -        self.surface = self.limit.transform(settings.SURFACE_SRID, -                                            clone=True).area -        if not self.surface: +        surface = self.limit.transform(settings.SURFACE_SRID, +                                       clone=True).area +        if surface > 214748364 or not surface:              return False +        self.surface = surface          self.save()          return True | 
