Code

Ticket #11993: 11993.diff

File 11993.diff, 431 bytes (added by kklimonda, 5 years ago)

add ValueError to list of caught exceptions

Line 
1Index: django/template/defaultfilters.py
2===================================================================
3--- django/template/defaultfilters.py   (wersja 11602)
4+++ django/template/defaultfilters.py   (kopia robocza)
5@@ -162,7 +162,7 @@
6 
7     try:
8         m = int(d) - d
9-    except (OverflowError, InvalidOperation):
10+    except (ValueError, OverflowError, InvalidOperation):
11         return input_val
12 
13     if not m and p < 0: