From 8201f431b008de714963726fa90d7babd9a6f417 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Kl=C3=BCnder?= Date: Mon, 26 Aug 2024 14:29:42 +0200 Subject: [PATCH] "fix" geometryfield --- src/c3nav/mapdata/fields.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/c3nav/mapdata/fields.py b/src/c3nav/mapdata/fields.py index 27f4e71f..cd136682 100644 --- a/src/c3nav/mapdata/fields.py +++ b/src/c3nav/mapdata/fields.py @@ -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: