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
1 changed files with 2 additions and 0 deletions

View File

@ -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):