diff --git a/src/openforms/registrations/contrib/objects_api/templatetags/registrations/contrib/objects_api/json_tags.py b/src/openforms/registrations/contrib/objects_api/templatetags/registrations/contrib/objects_api/json_tags.py index 284ef91b93..77a1c95322 100644 --- a/src/openforms/registrations/contrib/objects_api/templatetags/registrations/contrib/objects_api/json_tags.py +++ b/src/openforms/registrations/contrib/objects_api/templatetags/registrations/contrib/objects_api/json_tags.py @@ -20,10 +20,10 @@ def uploaded_attachment_urls(context: template.Context) -> SafeString: @register.simple_tag(takes_context=True) -def json_summary(context: template.Context) -> SafeString | dict: +def json_summary(context: template.Context) -> SafeString: submission = context.get("_submission") if not submission: - return {} + return SafeString({}) json_data = render_json(submission) @@ -34,14 +34,14 @@ def json_summary(context: template.Context) -> SafeString | dict: @register.simple_tag -def as_geo_json(value: list[float] | str) -> SafeString | dict: +def as_geo_json(value: list[float] | str) -> SafeString: """Output the ``value`` as a safe GeoJSON dumped string. As of today, this only supports coordinates. This essentially does the same thing as :func:`_transform_coordinates`, but for any map component. """ if not value: - return {} + return SafeString({}) data = {"type": "Point", "coordinates": [value[0], value[1]]} return SafeString(json.dumps(data))