Code

Ticket #4089: defaultfilters.py.diff

File defaultfilters.py.diff, 530 bytes (added by rezzrovv <pspierce@…>, 7 years ago)
Line 
1Index: django/template/defaultfilters.py
2===================================================================
3--- django/template/defaultfilters.py   (revision 5030)
4+++ django/template/defaultfilters.py   (working copy)
5@@ -321,7 +321,7 @@
6     "Joins a list with a string, like Python's ``str.join(list)``"
7     try:
8         return arg.join(map(smart_string, value))
9-    except AttributeError: # fail silently but nicely
10+    except AttributeError, TypeError: # fail silently but nicely
11         return value
12 
13 def length(value):