diff --git a/ereuse_devicehub/resources/action/models.py b/ereuse_devicehub/resources/action/models.py index 2f7cde4b..dcebaa05 100644 --- a/ereuse_devicehub/resources/action/models.py +++ b/ereuse_devicehub/resources/action/models.py @@ -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)