From 0a7ec91dc3fb03502a38ea501f2b24f5730c484c Mon Sep 17 00:00:00 2001 From: Karen Tracey Date: Tue, 9 Mar 2010 14:49:50 +0000 Subject: [PATCH] [1.1.X] Changed last_executed_query to avoid raising exceptions on non-utf8-encoded parameter data. r12737 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@12738 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/db/backends/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/db/backends/__init__.py b/django/db/backends/__init__.py index 9a1fe30925..f4a64957ec 100644 --- a/django/db/backends/__init__.py +++ b/django/db/backends/__init__.py @@ -208,7 +208,7 @@ class BaseDatabaseOperations(object): 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: