From 0449dcc731e6f0a753d18e686fdb27713f6017e7 Mon Sep 17 00:00:00 2001
From: Adrian Pino <adrian.pino@i2cat.net>
Date: Thu, 29 Jun 2023 16:24:03 +0000
Subject: [PATCH] Fix site_selector format

---
 gso/workflows/device/create_device.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gso/workflows/device/create_device.py b/gso/workflows/device/create_device.py
index 08b204b5..681b5259 100644
--- a/gso/workflows/device/create_device.py
+++ b/gso/workflows/device/create_device.py
@@ -30,7 +30,7 @@ from gso.services.provisioning_proxy import (
 )
 
 
-def site_selector() -> list:
+def site_selector() -> Choice:
     site_subscriptions = {}
     for site_id, site_description in (
         SubscriptionTable.query.join(ProductTable)
@@ -131,7 +131,7 @@ def initialize_subscription(
     subscription.device.device_ts_port = str(ts_port)
     subscription.device.device_vendor = device_vendor
     subscription.device.device_site = Site.from_subscription(
-        device_site[0]
+        device_site
     ).site
     fqdn = (
         f"{hostname}.{subscription.device.device_site.site_name.lower()}."
-- 
GitLab