From 30246d6be53857d602a988a1f5cb78dc7950fa0a Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Fri, 12 Feb 2021 20:22:04 +0100 Subject: [PATCH] fixing metrics --- ereuse_devicehub/resources/device/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ereuse_devicehub/resources/device/models.py b/ereuse_devicehub/resources/device/models.py index 74d7ce97..300aeab9 100644 --- a/ereuse_devicehub/resources/device/models.py +++ b/ereuse_devicehub/resources/device/models.py @@ -353,6 +353,7 @@ class Device(Thing): actions.sort(key=lambda x: x.created) allocates = [] for act in actions: + lifetime = 0 if act.type == 'Snapshot': snapshot = act lifestimes = snapshot.get_last_lifetimes()