diff --git a/pandora/websocket/worker.py b/pandora/websocket/worker.py index 1a0e633d4..9a3d7bd4d 100644 --- a/pandora/websocket/worker.py +++ b/pandora/websocket/worker.py @@ -24,7 +24,7 @@ class Worker(ConsumerMixin): def process_task(self, body, message): try: - if body['task'] == 'trigger_event': + if isinstance(body, dict) and body.get('task') == 'trigger_event': daemon.trigger_event(*body['args']) except: logger.error('faild to trigger event %s', body, exc_info=True)