From 8e1bd6848d1c774a2dde17e27acd3f4b7815b0eb Mon Sep 17 00:00:00 2001 From: Viktor van Wijk Date: Tue, 7 Jan 2025 16:06:36 +0100 Subject: [PATCH] :bug: [#4908] Add json of response to result dict in JSON dump plugin The requests.Response object is not JSON serializable, so need to just add the json of it. --- src/openforms/registrations/contrib/json_dump/plugin.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/openforms/registrations/contrib/json_dump/plugin.py b/src/openforms/registrations/contrib/json_dump/plugin.py index 27ae32e228..f2d13582fe 100644 --- a/src/openforms/registrations/contrib/json_dump/plugin.py +++ b/src/openforms/registrations/contrib/json_dump/plugin.py @@ -66,12 +66,14 @@ def register_submission( service = options["service"] submission.registration_result = result = {} with build_client(service) as client: - result["api_response"] = res = client.post( + res = client.post( options.get("relative_api_endpoint", ""), json=json, ) res.raise_for_status() + result["api_response"] = res.json() + return result def check_config(self) -> None: