Permalink
Browse files

Changed last_executed_query to avoid raising exceptions on non-utf8-e…

…ncoded parameter data.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12737 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
kmtracey committed Mar 9, 2010
1 parent bb72aca commit ea288f14e0066848c31f18a7fc7344c6a51a6926
Showing with 1 addition and 1 deletion.
  1. +1 −1 django/db/backends/__init__.py
@@ -206,7 +206,7 @@ def last_executed_query(self, cursor, sql, params):
from django.utils.encoding import smart_unicode, force_unicode
# Convert params to contain Unicode values.
- to_unicode = lambda s: force_unicode(s, strings_only=True)
+ to_unicode = lambda s: force_unicode(s, strings_only=True, errors='replace')
if isinstance(params, (list, tuple)):
u_params = tuple([to_unicode(val) for val in params])
else:

0 comments on commit ea288f1

Please sign in to comment.