From ae596e2a49974d4f46515f46afe15c1e8a4d2d00 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Thu, 14 Jan 2021 18:10:50 +0100 Subject: [PATCH] fixing bug --- ereuse_devicehub/resources/action/models.py | 2 +- ereuse_devicehub/resources/device/models.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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: