fix more bugs caused by updates, especially using unwrap_geom
This commit is contained in:
parent
1837c49ab8
commit
9618d7304f
9 changed files with 59 additions and 38 deletions
|
@ -55,6 +55,9 @@ class GeometryField(models.JSONField):
|
|||
def to_python(self, value):
|
||||
if value is None or value == '':
|
||||
return None
|
||||
if isinstance(value, str):
|
||||
# todo: this is all too complex, why do we need this?
|
||||
value = json.loads(value)
|
||||
try:
|
||||
geometry = shape(value)
|
||||
except Exception:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue