From a3ac73d6da5f1ae6eb8d9d95b5763bb391f3e7f4 Mon Sep 17 00:00:00 2001 From: Pallab Pain Date: Wed, 3 Jul 2024 16:39:29 +0530 Subject: [PATCH] fix(device): sets device labels correctly (#329) --- riocli/device/model.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/riocli/device/model.py b/riocli/device/model.py index 3a96a2e7..daad4563 100644 --- a/riocli/device/model.py +++ b/riocli/device/model.py @@ -51,8 +51,9 @@ def create_object(self, client: Client, **kwargs) -> v1Device: hwil_response = create_hwil_device(self.spec, self.metadata) # Generate labels to store HWIL metadata in rapyuta.io device. - l = make_device_labels_from_hwil_device(hwil_response) - self.metadata.get('labels', {}).update(l) + labels = make_device_labels_from_hwil_device(hwil_response) + labels.update(self.metadata.get('labels', {})) + self.metadata.labels = labels # Create the rapyuta.io device. device = client.create_device(self.to_v1())