fix orohans storage with parents
This commit is contained in:
parent
09a0a30386
commit
d8541d917c
|
@ -30,6 +30,9 @@ def clone_device(device):
|
||||||
new_device.devicehub_id = old_devicehub_id
|
new_device.devicehub_id = old_devicehub_id
|
||||||
device.devicehub_id = None
|
device.devicehub_id = None
|
||||||
new_device.owner = device.owner
|
new_device.owner = device.owner
|
||||||
|
if device.parent and device.parent.binding:
|
||||||
|
new_device.parent = device.parent.binding.device
|
||||||
|
|
||||||
db.session.add(new_device)
|
db.session.add(new_device)
|
||||||
|
|
||||||
placeholder = Placeholder(
|
placeholder = Placeholder(
|
||||||
|
|
Reference in New Issue