fixing definitly total_seconds

This commit is contained in:
Cayo Puigdefabregas 2021-01-14 18:31:33 +01:00
parent 8b8ff2d2c1
commit b5e64bf0aa
1 changed files with 3 additions and 3 deletions

View File

@ -557,8 +557,8 @@ class Snapshot(JoinedWithOneDeviceMixin, ActionWithOneDevice):
for act in hd.actions: for act in hd.actions:
if not act.type == "TestDataStorage": if not act.type == "TestDataStorage":
continue continue
data['lifetime'] = act.lifetime if not act.lifetime:
if not isinstance(act.lifetime, int): continue
data['lifetime'] = act.lifetime.total_seconds() data['lifetime'] = act.lifetime.total_seconds()
break break
hdds.append(data) hdds.append(data)