mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-09 12:30:15 +02:00
Merge branch 'cherry-pick-4836559a' into 'v2.12.x'
Merge branch 'fix-decimal_widthratio-template-tag' into 'v2.12.x' See merge request allianceauth/allianceauth!1420
This commit is contained in:
commit
542fbafd98
@ -38,6 +38,9 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
@register.simple_tag()
|
||||
def decimal_widthratio(this_value, max_value, max_width) -> str:
|
||||
if max_value == 0:
|
||||
return str(0)
|
||||
|
||||
return str(round(this_value/max_value * max_width, 2))
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user