summaryrefslogtreecommitdiff
path: root/django/db/backends/postgresql/base.py
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-08-11 05:23:19 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-08-11 05:23:19 +0000
commit31ba14761e6b06d9ef3a73ffee1f7ef0e4325db4 (patch)
treeaed037c5936405299046aa895e734b199c85699a /django/db/backends/postgresql/base.py
parent049212e95079d612b37b6fb9f3fba8616f5f7a7b (diff)
Fixed #5134 -- Return empty strings as Unicode in psycopg1 backend.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5834 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/backends/postgresql/base.py')
-rw-r--r--django/db/backends/postgresql/base.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/backends/postgresql/base.py b/django/db/backends/postgresql/base.py
index d90f0cc225..9d0967fa2b 100644
--- a/django/db/backends/postgresql/base.py
+++ b/django/db/backends/postgresql/base.py
@@ -278,7 +278,7 @@ def typecast_string(s):
"""
Cast all returned strings to unicode strings.
"""
- if not s:
+ if not s and not isinstance(s, str):
return s
return smart_unicode(s)