"fix" geometryfield
This commit is contained in:
parent
f729efb9d4
commit
8201f431b0
1 changed files with 2 additions and 2 deletions
|
@ -85,8 +85,8 @@ class GeometryField(models.JSONField):
|
||||||
if value is None or value == '':
|
if value is None or value == '':
|
||||||
return None
|
return None
|
||||||
if isinstance(value, str):
|
if isinstance(value, str):
|
||||||
raise ValueError('got a string in GeometryField.to_python()')
|
# todo: would be nice to not need this oh god
|
||||||
# todo: not a todo, hopefully
|
value = json.loads(value)
|
||||||
try:
|
try:
|
||||||
geometry = shape(value)
|
geometry = shape(value)
|
||||||
except Exception:
|
except Exception:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue