diff --git a/ereuse_devicehub/resources/device/models.py b/ereuse_devicehub/resources/device/models.py index 300aeab9..8386b2ba 100644 --- a/ereuse_devicehub/resources/device/models.py +++ b/ereuse_devicehub/resources/device/models.py @@ -352,8 +352,8 @@ class Device(Thing): actions = copy.copy(self.actions) actions.sort(key=lambda x: x.created) allocates = [] + lifetime = 0 for act in actions: - lifetime = 0 if act.type == 'Snapshot': snapshot = act lifestimes = snapshot.get_last_lifetimes()