mirror of
https://github.com/django/django.git
synced 2025-10-29 16:46:11 +00:00
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
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user