Merge pull request #120 from eReuse/bugfix/metrics

fixed
This commit is contained in:
cayop 2021-02-12 20:16:20 +01:00 committed by GitHub
commit e5af99150d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -376,7 +376,9 @@ class Device(Thing):
allocate = copy.copy(allo)
allocate['type'] = 'Live'
allocate['liveCreate'] = act.created
allocate['usageTimeHdd'] = act.usage_time_hdd.total_seconds()/3600
allocate['usageTimeHdd'] = 0
if act.usage_time_hdd:
allocate['usageTimeHdd'] = act.usage_time_hdd.total_seconds()/3600
allocates.append(allocate)
if act.type == 'Deallocate':