Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ICS Control System Infrastructure
Netbox
Commits
92ee2f16
Commit
92ee2f16
authored
Dec 01, 2022
by
Arthur
Browse files
11041 return power percentage with 1 decimal place
parent
fb407e90
Changes
1
Hide whitespace changes
Inline
Side-by-side
netbox/utilities/templatetags/helpers.py
View file @
92ee2f16
...
...
@@ -138,7 +138,8 @@ def percentage(x, y):
"""
if
x
is
None
or
y
is
None
:
return
None
return
round
(
x
/
y
*
100
)
return
round
(
x
/
y
*
100
,
1
)
@
register
.
filter
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment