GeometryField.to_python should accept empty string
This commit is contained in:
parent
1c1227c361
commit
047073f7a1
1 changed files with 1 additions and 1 deletions
|
@ -47,7 +47,7 @@ class GeometryField(models.TextField):
|
|||
return shape(json.loads(value))
|
||||
|
||||
def to_python(self, value):
|
||||
if value is None:
|
||||
if value is None or value == '':
|
||||
return None
|
||||
try:
|
||||
geometry = shape(json.loads(value))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue