From 817aad7c8ba74243aaabddc0f4887d52b91977c5 Mon Sep 17 00:00:00 2001 From: Trenton H <797416+stumpylog@users.noreply.github.com> Date: Tue, 4 Mar 2025 10:56:28 -0800 Subject: [PATCH] Fix: Switches data to content to upload raw bytes/text content (#9293) --- src/documents/signals/handlers.py | 2 +- src/documents/tests/test_workflows.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/documents/signals/handlers.py b/src/documents/signals/handlers.py index 1fd34dd81..7241924e4 100644 --- a/src/documents/signals/handlers.py +++ b/src/documents/signals/handlers.py @@ -632,7 +632,7 @@ def send_webhook( else: httpx.post( url, - data=data, + content=data, files=files, headers=headers, ).raise_for_status() diff --git a/src/documents/tests/test_workflows.py b/src/documents/tests/test_workflows.py index b9205d4bb..94dcb7689 100644 --- a/src/documents/tests/test_workflows.py +++ b/src/documents/tests/test_workflows.py @@ -2603,7 +2603,7 @@ class TestWorkflows( mock_post.assert_called_once_with( "http://paperless-ngx.com", - data="Test message", + content="Test message", headers={}, files=None, )