fix: crash if product or description None
This commit is contained in:
parent
042a6fcf35
commit
8c12fa8e86
1 changed files with 1 additions and 2 deletions
|
|
@ -309,14 +309,13 @@ class Inventory():
|
||||||
description = disk.get('description')
|
description = disk.get('description')
|
||||||
size = disk.get('size')
|
size = disk.get('size')
|
||||||
product = disk.get('product')
|
product = disk.get('product')
|
||||||
if logicalname in raid_devices or disk_type is None:
|
if logicalname in raid_devices or disk_type is None or product is None or description is None:
|
||||||
return True
|
return True
|
||||||
non_raid_disks = [
|
non_raid_disks = [
|
||||||
'MR9361-8i',
|
'MR9361-8i',
|
||||||
]
|
]
|
||||||
|
|
||||||
if logicalname in raid_devices or \
|
if logicalname in raid_devices or \
|
||||||
disk_type is None or \
|
|
||||||
product in non_raid_disks or \
|
product in non_raid_disks or \
|
||||||
'virtual' in product.lower() or \
|
'virtual' in product.lower() or \
|
||||||
'logical' in product.lower() or \
|
'logical' in product.lower() or \
|
||||||
|
|
|
||||||
Loading…
Add table
editor.link_modal.header
Reference in a new issue