fix battery migration

This commit is contained in:
Cayo Puigdefabregas 2022-08-03 17:28:59 +02:00
parent 08d7012bd9
commit dcc445a42e
1 changed files with 2 additions and 0 deletions

View File

@ -59,6 +59,8 @@ def clone_device(device):
if device.binding: if device.binding:
return return
if device.type == "Battery":
device.size
dict_device = copy.copy(device.__dict__) dict_device = copy.copy(device.__dict__)
dict_device.pop('_sa_instance_state') dict_device.pop('_sa_instance_state')
dict_device.pop('id', None) dict_device.pop('id', None)