diff options
| author | Jannis Leidel | 2013-04-25 06:16:10 -0700 |
|---|---|---|
| committer | Jannis Leidel | 2013-04-25 06:16:10 -0700 |
| commit | 59fa7518e14e298df43d79c5c4b5ae7f5f4919d5 (patch) | |
| tree | f1ffc95e9b15ff7fe06e096fc5d227cfcde50e4f | |
| parent | 1390c405f6718dc44169503176f610f194fe6d41 (diff) | |
| parent | d59133709a3ee213ceff7c65dc03cfee9b00b8d2 (diff) | |
| download | django-debug-toolbar-59fa7518e14e298df43d79c5c4b5ae7f5f4919d5.tar.bz2 | |
Merge pull request #376 from midiotthimble/sql-panel-refactor
Fixes UnicodeEncodeError sometimes
| -rw-r--r-- | debug_toolbar/forms.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/debug_toolbar/forms.py b/debug_toolbar/forms.py index 9793f5e..f93abf7 100644 --- a/debug_toolbar/forms.py +++ b/debug_toolbar/forms.py @@ -1,5 +1,6 @@ from django import forms from django.conf import settings +from django.utils.encoding import smart_str from django.core.exceptions import ValidationError from debug_toolbar.utils.functional import cached_property @@ -82,7 +83,7 @@ class SQLSelectForm(forms.Form): def make_hash(self, data): params = settings.SECRET_KEY + data['sql'] + data['params'] - return sha1(params).hexdigest() + return sha1(smart_str(params)).hexdigest() @property def connection(self): |
