diff --git a/ereuse_devicehub/resources/action/models.py b/ereuse_devicehub/resources/action/models.py index 9c93ef29..b04e62ac 100644 --- a/ereuse_devicehub/resources/action/models.py +++ b/ereuse_devicehub/resources/action/models.py @@ -557,7 +557,7 @@ class Snapshot(JoinedWithOneDeviceMixin, ActionWithOneDevice): for act in hd.actions: if not act.type == "TestDataStorage": continue - data['lifetime'] = act.lifetime.total_seconds() + data['lifetime'] = act.lifetime break hdds.append(data) diff --git a/ereuse_devicehub/resources/device/models.py b/ereuse_devicehub/resources/device/models.py index 7081ce49..5d9346a3 100644 --- a/ereuse_devicehub/resources/device/models.py +++ b/ereuse_devicehub/resources/device/models.py @@ -346,7 +346,7 @@ class Device(Thing): if act.type == 'Live': allocate = copy.copy(allo) - lifetime = act.usage_time_hdd.total_seconds() + lifetime = act.usage_time_hdd allocate['type'] = 'Live' allocate['liveCreate'] = act.created for hd in lifestimes: