aboutsummaryrefslogtreecommitdiffstats
path: root/debug_toolbar
diff options
context:
space:
mode:
Diffstat (limited to 'debug_toolbar')
-rw-r--r--debug_toolbar/utils/tracking/db.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/debug_toolbar/utils/tracking/db.py b/debug_toolbar/utils/tracking/db.py
index db9974e..b675227 100644
--- a/debug_toolbar/utils/tracking/db.py
+++ b/debug_toolbar/utils/tracking/db.py
@@ -92,9 +92,10 @@ class NormalCursorWrapper(object):
return map(self._quote_expr, params)
def _decode(self, param):
- if isinstance(param, unicode):
- return param.decode('utf-8', 'ignore')
- return param
+ try:
+ return force_unicode(param, strings_only=True)
+ except UnicodeDecodeError:
+ return '(encoded string)'
def execute(self, sql, params=()):
start = datetime.now()