diff --git a/ereuse_devicehub/migrations/versions/d7ea9a3b2da1_create_placeholders.py b/ereuse_devicehub/migrations/versions/d7ea9a3b2da1_create_placeholders.py index 9e4a9dbe..05e09ac3 100644 --- a/ereuse_devicehub/migrations/versions/d7ea9a3b2da1_create_placeholders.py +++ b/ereuse_devicehub/migrations/versions/d7ea9a3b2da1_create_placeholders.py @@ -59,6 +59,8 @@ def clone_device(device): if device.binding: return + if device.type == "Battery": + device.size dict_device = copy.copy(device.__dict__) dict_device.pop('_sa_instance_state') dict_device.pop('id', None)