mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
11041 return power percentage with 1 decimal place
This commit is contained in:
@@ -138,7 +138,8 @@ def percentage(x, y):
|
|||||||
"""
|
"""
|
||||||
if x is None or y is None:
|
if x is None or y is None:
|
||||||
return None
|
return None
|
||||||
return round(x / y * 100)
|
|
||||||
|
return round(x / y * 100, 1)
|
||||||
|
|
||||||
|
|
||||||
@register.filter()
|
@register.filter()
|
||||||
|
Reference in New Issue
Block a user