summaryrefslogtreecommitdiff
path: root/django/utils/http.py
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2012-06-14 11:32:40 +0200
committerClaude Paroz <claude@2xlibre.net>2012-06-14 11:32:40 +0200
commitfe873e276527534b3c0c22f457ee314cf029ced4 (patch)
tree457109194ae041c2de2bbc8c067b29e888edb593 /django/utils/http.py
parenta2022dae7ff70b00ab61e2ca2da0980a7747824b (diff)
Fixed #12140 -- Fixed http.urlencode result for empty lists
Thanks aneil for the report and the initial patch.
Diffstat (limited to 'django/utils/http.py')
-rw-r--r--django/utils/http.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/utils/http.py b/django/utils/http.py
index dbd18d8ff0..87db284416 100644
--- a/django/utils/http.py
+++ b/django/utils/http.py
@@ -71,7 +71,7 @@ def urlencode(query, doseq=0):
query = query.items()
return urllib.urlencode(
[(smart_str(k),
- isinstance(v, (list,tuple)) and [smart_str(i) for i in v] or smart_str(v))
+ [smart_str(i) for i in v] if isinstance(v, (list,tuple)) else smart_str(v))
for k, v in query],
doseq)