summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dashboard/src/resource_inventory/pdf_templater.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/dashboard/src/resource_inventory/pdf_templater.py b/dashboard/src/resource_inventory/pdf_templater.py
index d08b303..2302530 100644
--- a/dashboard/src/resource_inventory/pdf_templater.py
+++ b/dashboard/src/resource_inventory/pdf_templater.py
@@ -168,8 +168,13 @@ class PDFTemplater:
iface_info['features'] = "none"
iface_info['mac_address'] = interface.mac_address
iface_info['name'] = interface.name
- profile = InterfaceProfile.objects.get(host=interface.host.profile, name=interface.name)
- iface_info['speed'] = str(int(profile.speed / 1000)) + "gb"
+ speed = "unknown"
+ try:
+ profile = InterfaceProfile.objects.get(host=interface.host.profile, name=interface.name)
+ speed = str(int(profile.speed / 1000)) + "gb"
+ except Exception:
+ pass
+ iface_info['speed'] = speed
return iface_info
@classmethod