summaryrefslogtreecommitdiff
path: root/django/utils/numberformat.py
diff options
context:
space:
mode:
authorJimmy Angelakos <vyruss@hellug.gr>2022-09-12 12:59:14 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-09-12 13:02:50 +0200
commit07ebef566f751e172e266165071081c7614e2d33 (patch)
treefebe152d68039197819d608c347045366047aa9f /django/utils/numberformat.py
parente911e0996f1096cc23ef03b1ca70da7499dd8f2f (diff)
Refs #34000 -- Optimized handling None values in numberformat.format().
Diffstat (limited to 'django/utils/numberformat.py')
-rw-r--r--django/utils/numberformat.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/utils/numberformat.py b/django/utils/numberformat.py
index 35bbdd39e1..6e3628ff91 100644
--- a/django/utils/numberformat.py
+++ b/django/utils/numberformat.py
@@ -25,7 +25,7 @@ def format(
module in locale.localeconv() LC_NUMERIC grouping (e.g. (3, 2, 0)).
* thousand_sep: Thousand separator symbol (for example ",")
"""
- if number == "":
+ if number is None or number == "":
return mark_safe(number)
use_grouping = (
use_l10n or (use_l10n is None and settings.USE_L10N)