From fab2a612ac47a4beddf7e3c74285a580b631abb8 Mon Sep 17 00:00:00 2001 From: Julio-Oliveira-Encora Date: Thu, 23 May 2024 16:08:05 -0300 Subject: [PATCH] Changed humanize_megabytes --- netbox/utilities/templatetags/helpers.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/netbox/utilities/templatetags/helpers.py b/netbox/utilities/templatetags/helpers.py index e2a16d088..02ddc8e80 100644 --- a/netbox/utilities/templatetags/helpers.py +++ b/netbox/utilities/templatetags/helpers.py @@ -111,13 +111,13 @@ def humanize_megabytes(mb): bytes = int(mb * 1024**2) if bytes >= factors["tera"]: - return f"{bytes / factors["tera"]:.2f} TB" + return f"{bytes / factors['tera']:.2f} TB" if bytes >= factors["giga"]: - return f"{bytes / factors["giga"]:.2f} GB" + return f"{bytes / factors['giga']:.2f} GB" if bytes >= factors["mega"]: - return f"{bytes / factors["mega"]:.2f} MB" + return f"{bytes / factors['mega']:.2f} MB" @register.filter()