aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Homza2014-02-18 11:33:15 +0200
committerAlexey Homza2014-02-18 11:33:15 +0200
commit9eec3b68ebca42656ca15d50bbb1dd6b22ab95a7 (patch)
treeaa0309af90d42c625b56d9e1a9dbdc2c33d21211
parent06c3824c031d19013a4db8f844c503ab8e6b80ea (diff)
downloaddjango-debug-toolbar-9eec3b68ebca42656ca15d50bbb1dd6b22ab95a7.tar.bz2
Update forms.py
Fix UnicodeDecodeError exception when sql params has unicode characters
-rw-r--r--debug_toolbar/panels/sql/forms.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/debug_toolbar/panels/sql/forms.py b/debug_toolbar/panels/sql/forms.py
index 582f611..58a4dba 100644
--- a/debug_toolbar/panels/sql/forms.py
+++ b/debug_toolbar/panels/sql/forms.py
@@ -80,7 +80,7 @@ class SQLSelectForm(forms.Form):
items = [settings.SECRET_KEY, data['sql'], data['params']]
# Replace lines endings with spaces to preserve the hash value
# even when the browser normalizes \r\n to \n in inputs.
- items = [force_text(' '.join(item.splitlines())) for item in items]
+ items = [' '.join(force_text(item).splitlines()) for item in items]
return hashlib.sha1(''.join(items).encode('utf-8')).hexdigest()
@property