From eec82b52ee17d3190ed7c590bad5f2d2250e0e1e Mon Sep 17 00:00:00 2001 From: Bobbe Date: Wed, 25 Oct 2023 02:11:54 +0200 Subject: [PATCH] Fix checking if decimal_places is set --- InvenTree/InvenTree/format.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InvenTree/InvenTree/format.py b/InvenTree/InvenTree/format.py index 5bf650508d..ab4267959f 100644 --- a/InvenTree/InvenTree/format.py +++ b/InvenTree/InvenTree/format.py @@ -187,7 +187,7 @@ def format_money(money: Money, decimal_places: int = None, format: str = None) - pattern = parse_pattern(format) else: pattern = locale.currency_formats["standard"] - if decimal_places: + if decimal_places is not None: pattern.frac_prec = (decimal_places, decimal_places) return pattern.apply(