diff --git a/mfl_gis/models.py b/mfl_gis/models.py index 28494d55..47b8efb2 100755 --- a/mfl_gis/models.py +++ b/mfl_gis/models.py @@ -38,14 +38,14 @@ def _validate_within_boundaries(self, boundary_model, area, raise_not_found=True try: boundary = boundary_model.objects.get(area=area) if not boundary.mpoly.contains(self.coordinates): - # raise ValidationError({ - # "coordinates": [ - # '({0}, {1}) not contained in boundary of {2}'.format( - # self.coordinates.x, self.coordinates.y, area - # ) - # ] - # }) - pass + raise ValidationError({ + "coordinates": [ + '({0}, {1}) not contained in boundary of {2}'.format( + self.coordinates.x, self.coordinates.y, area + ) + ] + }) + # pass' else: return True except boundary_model.DoesNotExist: