fix orohans storage with parents

This commit is contained in:
Cayo Puigdefabregas 2022-11-07 11:25:01 +01:00
parent 09a0a30386
commit d8541d917c
1 changed files with 3 additions and 0 deletions

View File

@ -30,6 +30,9 @@ def clone_device(device):
new_device.devicehub_id = old_devicehub_id
device.devicehub_id = None
new_device.owner = device.owner
if device.parent and device.parent.binding:
new_device.parent = device.parent.binding.device
db.session.add(new_device)
placeholder = Placeholder(