From bb91c0a4dcad89ec9ad14306e9708d11ea385444 Mon Sep 17 00:00:00 2001 From: Sergey Fedoseev Date: Thu, 10 Aug 2017 03:02:16 +0500 Subject: [PATCH] Refs #4518 -- Removed handling of empty strings in typecast_decimal(). It's unclear if the original change was needed, but it seems unneeded now. Reverted 6fc10f50b0c9b877fffcad4893056cb91fa66b4f. --- django/db/backends/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/db/backends/utils.py b/django/db/backends/utils.py index 5dd6d85486..e5b2d5235f 100644 --- a/django/db/backends/utils.py +++ b/django/db/backends/utils.py @@ -161,7 +161,7 @@ def typecast_timestamp(s): # does NOT store time zone information def typecast_decimal(s): - if s is None or s == '': + if s is None: return None return decimal.Decimal(s)