Skip to content

Commit

Permalink
🐛 [#4908] Add json of response to result dict in JSON dump plugin
Browse files Browse the repository at this point in the history
The requests.Response object is not JSON serializable, so need to just add the json of it.
  • Loading branch information
viktorvanwijk committed Jan 7, 2025
1 parent f2c23fe commit 8e1bd68
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/openforms/registrations/contrib/json_dump/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 8e1bd68

Please sign in to comment.