fixing definitly total_seconds

This commit is contained in:
Cayo Puigdefabregas 2021-01-14 18:31:33 +01:00
parent 8b8ff2d2c1
commit b5e64bf0aa

View file

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