Skip to content

Commit cf80ad0

Browse files
committed
fix hostname issue in the switches list
1 parent befb951 commit cf80ad0

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

django_app/backend/mist_lib/devices.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,10 @@ def _get_devices_vc(self, extract, site_id, devices):
5959
extract["host"], site_id, device_id)
6060
resp = requests.get(
6161
url, headers=extract["headers"], cookies=extract["cookies"])
62+
tmp = resp.json()
63+
tmp["name"] = device["name"]
6264
logging.info("Device:{0}:VC: Done".format(site_id))
63-
data.append(resp.json())
65+
data.append(tmp)
6466
except:
6567
logging.error("Device:{0}:VC: Error".format(site_id))
6668
#return {"status": 500, "data": {"message": "Unable to retrieve information for device {0}".format(device_id)}}

0 commit comments

Comments
 (0)