"fix" geometryfield

This commit is contained in:
Laura Klünder 2024-08-26 14:29:42 +02:00
parent f729efb9d4
commit 8201f431b0

View file

@ -85,8 +85,8 @@ class GeometryField(models.JSONField):
if value is None or value == '':
return None
if isinstance(value, str):
raise ValueError('got a string in GeometryField.to_python()')
# todo: not a todo, hopefully
# todo: would be nice to not need this oh god
value = json.loads(value)
try:
geometry = shape(value)
except Exception: