1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Restore total length count on trace view

This commit is contained in:
Jeremy Stretch
2020-10-06 16:58:11 -04:00
parent 2c9ae60dec
commit 44b842592a
4 changed files with 30 additions and 11 deletions

View File

@@ -1984,15 +1984,11 @@ class PathTraceView(ObjectView):
else:
path = related_paths.first()
# total_length = sum(
# [entry[1]._abs_length for entry in path if entry[1] and entry[1]._abs_length]
# )
return render(request, 'dcim/cable_trace.html', {
'obj': obj,
'path': path,
'related_paths': related_paths,
# 'total_length': total_length,
'total_length': path.get_total_length(),
})