fix delete device

This commit is contained in:
Cayo Puigdefabregas 2022-07-20 12:39:21 +02:00
parent 924d9941bc
commit 7db53a5779
1 changed files with 4 additions and 0 deletions

View File

@ -930,6 +930,10 @@ class Delete(ActionWithMultipleDevicesCheckingOwner):
for dev in data['devices']: for dev in data['devices']:
if dev.last_action_trading is None: if dev.last_action_trading is None:
dev.active = False dev.active = False
if dev.binding:
dev.binding.device.active = False
if dev.placeholder:
dev.placeholder.device.active = False
class Migrate(ActionWithMultipleDevices): class Migrate(ActionWithMultipleDevices):