fixing bug of csv

This commit is contained in:
Cayo Puigdefabregas 2021-09-21 12:44:07 +02:00
parent 7f4bd91fdd
commit 1466cbc4f4

View file

@ -245,7 +245,8 @@ class DeviceRow(OrderedDict):
self['{} {} Size (MB)'.format(ctype, i)] = none2str(component.size)
erasures = [a for a in component.actions if a.type in [
component_actions = sorted(component.actions, key=lambda x: x.created)
erasures = [a for a in component_actions if a.type in [
'EraseBasic', 'EraseSectors', 'DataWipe']]
erasure = erasures[-1] if erasures else None
if not erasure: