fix: get disk serial number

This commit is contained in:
Cyril Levis 2022-12-13 17:26:14 +01:00
parent 282f914665
commit a9af96bba2
No known key found for this signature in database
GPG key ID: 6DB88737C11F5A48

View file

@ -371,7 +371,7 @@ class Inventory():
desc = disk.get('description') desc = disk.get('description')
name = '{} ({})'.format(disk['Model'], disk['Size']) name = '{} ({})'.format(disk['Model'], disk['Size'])
description = disk['Type'] description = disk['Type']
sn = getattr(disk, 'SN', 'unknown') sn = disk.get('SN', 'unknown')
parms = { parms = {
'device': self.device_id, 'device': self.device_id,