From cb4337ebc78c549240a049ac69598ed9f836f9bd Mon Sep 17 00:00:00 2001 From: lejeune quentin Date: Tue, 2 Mar 2021 15:04:15 +0000 Subject: [PATCH] [FIX] hw_drivers: Fix default for action on iot mapping Some requests are sended without specific action. So we need set these call to fit to a default action who is a empty string. Pull requeste related: 63375 closes odoo/odoo#67089 Signed-off-by: pimodoo --- addons/hw_drivers/driver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hw_drivers/driver.py b/addons/hw_drivers/driver.py index 4150f8189b1..0eaf5e1c226 100644 --- a/addons/hw_drivers/driver.py +++ b/addons/hw_drivers/driver.py @@ -49,7 +49,7 @@ class Driver(Thread, metaclass=DriverMetaClass): :param data: the `_actions` key mapped to the action method we want to call :type data: string """ - self._actions[data['action']](data) + self._actions[data.get('action', '')](data) def disconnect(self): self._stopped.set()