add has_no_effect check to changes and replace undo button icon
This commit is contained in:
parent
1d479c4eba
commit
79220c39f9
4 changed files with 12 additions and 2 deletions
|
@ -49,7 +49,9 @@ class GeometryField(models.TextField):
|
|||
return clean_geometry(shape(json.loads(value)))
|
||||
|
||||
def get_prep_value(self, value):
|
||||
if self.geomtype == 'polygon' and not isinstance(value, Polygon):
|
||||
if value == '':
|
||||
return None
|
||||
elif self.geomtype == 'polygon' and not isinstance(value, Polygon):
|
||||
raise TypeError(_('Expected Polygon instance, got %s instead.') % repr(value))
|
||||
elif self.geomtype == 'linestring' and not isinstance(value, LineString):
|
||||
raise TypeError(_('Expected LineString instance, got %s instead.') % repr(value))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue