From c77746e278dd2dfe07b1c5f37a5f993accfbc58c Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sun, 4 Sep 2022 16:06:58 +0200 Subject: [PATCH] If the output of a hook is null, make sure to normalize it an empty string before pushing it to Redis --- platypush/message/event/http/hook.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platypush/message/event/http/hook.py b/platypush/message/event/http/hook.py index e6f386100..134bcfe0b 100644 --- a/platypush/message/event/http/hook.py +++ b/platypush/message/event/http/hook.py @@ -78,6 +78,8 @@ class WebhookEvent(Event): if isinstance(output, (dict, list)): output = json.dumps(output) + if output is None: + output = '' get_redis().rpush(self.args['response_queue'], output) def wait_response(self, timeout=None):