From cfcff6765630bce654b0b069a8741c47182d9442 Mon Sep 17 00:00:00 2001 From: Sami Mokaddem Date: Wed, 26 Jun 2024 15:49:41 +0200 Subject: [PATCH] fix: [back] json.loads cannot load an empty string --- notification.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notification.py b/notification.py index 6545ced..daace3d 100644 --- a/notification.py +++ b/notification.py @@ -79,7 +79,7 @@ def get_request_post_body(data: dict) -> dict: request_content = data['request'] content_type, post_body = request_content.split('\n\n') if content_type == 'application/json': - post_body_parsed = json.loads(post_body) + post_body_parsed = json.loads(post_body) if len(post_body) > 0 else {} return post_body_parsed elif content_type == 'application/x-www-form-urlencoded': post_body_parsed = parse_qs(post_body)