From 3c9760a15266eb222c2f523425554e422e32ccda Mon Sep 17 00:00:00 2001 From: Armingol Date: Thu, 30 Nov 2023 12:51:58 +0100 Subject: [PATCH 1/3] fix bug issue 88 --- src/webui/service/device/routes.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/webui/service/device/routes.py b/src/webui/service/device/routes.py index ce15c7aba..c4d320f36 100644 --- a/src/webui/service/device/routes.py +++ b/src/webui/service/device/routes.py @@ -63,7 +63,8 @@ def add(): for key, _ in DeviceOperationalStatusEnum.DESCRIPTOR.values_by_name.items(): form.operational_status.choices.append( (DeviceOperationalStatusEnum.Value(key), key.replace('DEVICEOPERATIONALSTATUS_', ''))) - + + form.device_type.choices = [] # items for Device Type field for device_type in DeviceTypeEnum: form.device_type.choices.append((device_type.value,device_type.value)) -- GitLab From 4633e6ac9d1bae4ecc2e23eb87486086ba85b861 Mon Sep 17 00:00:00 2001 From: Armingol Date: Thu, 30 Nov 2023 16:40:02 +0100 Subject: [PATCH 2/3] code cleanup --- src/webui/service/device/routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webui/service/device/routes.py b/src/webui/service/device/routes.py index c4d320f36..f59155b9f 100644 --- a/src/webui/service/device/routes.py +++ b/src/webui/service/device/routes.py @@ -64,8 +64,8 @@ def add(): form.operational_status.choices.append( (DeviceOperationalStatusEnum.Value(key), key.replace('DEVICEOPERATIONALSTATUS_', ''))) - form.device_type.choices = [] # items for Device Type field + form.device_type.choices = [] for device_type in DeviceTypeEnum: form.device_type.choices.append((device_type.value,device_type.value)) -- GitLab From 64eefc8384328d4d5f2f2b9c591d16da0984daf0 Mon Sep 17 00:00:00 2001 From: Armingol Date: Thu, 30 Nov 2023 16:43:52 +0100 Subject: [PATCH 3/3] code cleanup --- src/webui/service/device/routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webui/service/device/routes.py b/src/webui/service/device/routes.py index f59155b9f..4459deeeb 100644 --- a/src/webui/service/device/routes.py +++ b/src/webui/service/device/routes.py @@ -63,7 +63,7 @@ def add(): for key, _ in DeviceOperationalStatusEnum.DESCRIPTOR.values_by_name.items(): form.operational_status.choices.append( (DeviceOperationalStatusEnum.Value(key), key.replace('DEVICEOPERATIONALSTATUS_', ''))) - + # items for Device Type field form.device_type.choices = [] for device_type in DeviceTypeEnum: -- GitLab