From a9af96bba2540116907717127190730f32521397 Mon Sep 17 00:00:00 2001 From: Cyril Levis Date: Tue, 13 Dec 2022 17:26:14 +0100 Subject: [PATCH] fix: get disk serial number --- netbox_agent/inventory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox_agent/inventory.py b/netbox_agent/inventory.py index 3b9e305..40e73d4 100644 --- a/netbox_agent/inventory.py +++ b/netbox_agent/inventory.py @@ -371,7 +371,7 @@ class Inventory(): desc = disk.get('description') name = '{} ({})'.format(disk['Model'], disk['Size']) description = disk['Type'] - sn = getattr(disk, 'SN', 'unknown') + sn = disk.get('SN', 'unknown') parms = { 'device': self.device_id,