fix more bugs caused by updates, especially using unwrap_geom

This commit is contained in:
Laura Klünder 2023-07-24 11:51:25 +02:00
parent 1837c49ab8
commit 9618d7304f
9 changed files with 59 additions and 38 deletions

View file

@ -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: