diff --git a/ereuse_devicehub/resources/device/sync.py b/ereuse_devicehub/resources/device/sync.py index 5f13d5a0..4efa67bc 100644 --- a/ereuse_devicehub/resources/device/sync.py +++ b/ereuse_devicehub/resources/device/sync.py @@ -52,6 +52,7 @@ class Sync: of the passed-in components. 2. A list of Add / Remove (not yet added to session). """ + db_device = self.execute_register(device) db_components, actions = OrderedSet(), OrderedSet() if components is not None: # We have component info (see above) @@ -71,6 +72,7 @@ class Sync: # We only want to perform Add/Remove to not new components actions = self.add_remove(db_device, not_new_components) db_device.components = db_components + db_device.add_mac_to_hid() return db_device, actions def execute_register_component(self, diff --git a/ereuse_devicehub/resources/device/views.py b/ereuse_devicehub/resources/device/views.py index 8f16b12d..1b87a426 100644 --- a/ereuse_devicehub/resources/device/views.py +++ b/ereuse_devicehub/resources/device/views.py @@ -230,6 +230,7 @@ class DeviceMergeView(View): base_device.manufacturer = latest_snapshot_device.manufacturer base_device.model = latest_snapshot_device.model base_device.chassis = latest_snapshot_device.chassis + base_device.add_mac_to_hid() class ManufacturerView(View):