diff --git a/ereuse_devicehub/resources/action/schemas.py b/ereuse_devicehub/resources/action/schemas.py index 3d8070a9..ad629da9 100644 --- a/ereuse_devicehub/resources/action/schemas.py +++ b/ereuse_devicehub/resources/action/schemas.py @@ -836,7 +836,8 @@ class Delete(ActionWithMultipleDevices): @post_load def deactivate_device(self, data): for dev in data['devices']: - dev.active = False + if dev.last_action_trading is None: + dev.active = False class Migrate(ActionWithMultipleDevices):