diff options
author | Parker Berberian <pberberian@iol.unh.edu> | 2019-05-09 17:12:27 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2019-05-09 17:12:27 +0000 |
commit | ae2b98bfcdb6e27463f4ff809806251a2778b116 (patch) | |
tree | 46885f09f6b35f5403a52ca9149bf5e1b1c21598 /dashboard/src/resource_inventory | |
parent | e4d40617fd6ebc6ef255ff9d00f586261c1d309f (diff) | |
parent | a296d84e3879465048a78b27ff4a1a253c405c65 (diff) |
Merge "Allow query to fail"
Diffstat (limited to 'dashboard/src/resource_inventory')
-rw-r--r-- | dashboard/src/resource_inventory/pdf_templater.py | 9 |
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 |