mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-12 22:10:16 +02:00
parent
9e139495ac
commit
8dd07b97c7
@ -38,6 +38,9 @@ logger = logging.getLogger(__name__)
|
|||||||
|
|
||||||
@register.simple_tag()
|
@register.simple_tag()
|
||||||
def decimal_widthratio(this_value, max_value, max_width) -> str:
|
def decimal_widthratio(this_value, max_value, max_width) -> str:
|
||||||
|
if max_value == 0:
|
||||||
|
return 0
|
||||||
|
|
||||||
return str(round(this_value/max_value * max_width, 2))
|
return str(round(this_value/max_value * max_width, 2))
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user