refixed bug
This commit is contained in:
parent
d5fffcb561
commit
8b8ff2d2c1
|
@ -558,6 +558,8 @@ class Snapshot(JoinedWithOneDeviceMixin, ActionWithOneDevice):
|
||||||
if not act.type == "TestDataStorage":
|
if not act.type == "TestDataStorage":
|
||||||
continue
|
continue
|
||||||
data['lifetime'] = act.lifetime
|
data['lifetime'] = act.lifetime
|
||||||
|
if not isinstance(act.lifetime, int):
|
||||||
|
data['lifetime'] = act.lifetime.total_seconds()
|
||||||
break
|
break
|
||||||
hdds.append(data)
|
hdds.append(data)
|
||||||
|
|
||||||
|
|
|
@ -346,7 +346,7 @@ class Device(Thing):
|
||||||
|
|
||||||
if act.type == 'Live':
|
if act.type == 'Live':
|
||||||
allocate = copy.copy(allo)
|
allocate = copy.copy(allo)
|
||||||
lifetime = act.usage_time_hdd
|
lifetime = act.usage_time_hdd.total_seconds()
|
||||||
allocate['type'] = 'Live'
|
allocate['type'] = 'Live'
|
||||||
allocate['liveCreate'] = act.created
|
allocate['liveCreate'] = act.created
|
||||||
for hd in lifestimes:
|
for hd in lifestimes:
|
||||||
|
|
Reference in New Issue