aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--debug_toolbar/panels/sql.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/debug_toolbar/panels/sql.py b/debug_toolbar/panels/sql.py
index dd36eb8..6b3f918 100644
--- a/debug_toolbar/panels/sql.py
+++ b/debug_toolbar/panels/sql.py
@@ -5,6 +5,7 @@ from django.db import connection
from django.db.backends import util
from django.template.loader import render_to_string
from django.utils import simplejson
+from django.utils.encoding import force_unicode
from django.utils.hashcompat import sha_constructor
class DatabaseStatTracker(util.CursorDebugWrapper):
@@ -28,7 +29,7 @@ class DatabaseStatTracker(util.CursorDebugWrapper):
'sql': self.db.ops.last_executed_query(self.cursor, sql, params),
'time': stop - start,
'raw_sql': sql,
- 'params': _params,
+ 'params': _params and [force_unicode(x) for x in _params] or _params,
'hash': sha_constructor(settings.SECRET_KEY + sql + _params).hexdigest(),
})
util.CursorDebugWrapper = DatabaseStatTracker