From e978e1df52f877dd71e881cac635500a79fc1753 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sun, 25 Oct 2020 22:11:24 +1100 Subject: [PATCH] Style fixes --- InvenTree/part/templatetags/inventree_extras.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/InvenTree/part/templatetags/inventree_extras.py b/InvenTree/part/templatetags/inventree_extras.py index 37a5c3055d..3af495cc1c 100644 --- a/InvenTree/part/templatetags/inventree_extras.py +++ b/InvenTree/part/templatetags/inventree_extras.py @@ -6,7 +6,7 @@ import os from django import template from InvenTree import version, settings -from InvenTree.helpers import decimal2string +import InvenTree.helpers from common.models import InvenTreeSetting, ColorTheme @@ -17,7 +17,7 @@ register = template.Library() def decimal(x, *args, **kwargs): """ Simplified rendering of a decimal number """ - return decimal2string(x) + return InvenTree.helpers.decimal2string(x) @register.simple_tag() @@ -26,6 +26,7 @@ def str2bool(x, *args, **kwargs): return InvenTree.helpers.str2bool(x) + @register.simple_tag() def inrange(n, *args, **kwargs): """ Return range(n) for iterating through a numeric quantity """ @@ -35,7 +36,7 @@ def inrange(n, *args, **kwargs): @register.simple_tag() def multiply(x, y, *args, **kwargs): """ Multiply two numbers together """ - return decimal2string(x * y) + return InvenTree.helpers.decimal2string(x * y) @register.simple_tag() @@ -48,7 +49,7 @@ def add(x, y, *args, **kwargs): def part_allocation_count(build, part, *args, **kwargs): """ Return the total number of allocated to """ - return decimal2string(build.getAllocatedQuantity(part)) + return InvenTree.helpers.decimal2string(build.getAllocatedQuantity(part)) @register.simple_tag()