If the output of a hook is null, make sure to normalize it an empty string before pushing it to Redis

This commit is contained in:
Fabio Manganiello 2022-09-04 16:06:58 +02:00
parent 4682fb4210
commit c77746e278

View file

@ -78,6 +78,8 @@ class WebhookEvent(Event):
if isinstance(output, (dict, list)): if isinstance(output, (dict, list)):
output = json.dumps(output) output = json.dumps(output)
if output is None:
output = ''
get_redis().rpush(self.args['response_queue'], output) get_redis().rpush(self.args['response_queue'], output)
def wait_response(self, timeout=None): def wait_response(self, timeout=None):