summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Godwin <andrew@aeracode.org>2014-08-07 22:33:42 +1000
committerAndrew Godwin <andrew@aeracode.org>2014-08-07 22:34:53 +1000
commita7336cdcbe90cfb32561b2f68dbe2ef40d544db8 (patch)
tree1fc5e8c6d76740f088c666a49392bdbafe3f3aed
parent796030590a851b1e75fee9172661abf0d6390cc3 (diff)
[1.7.x] Use smart_text rather than naive forcing-to-unicode for state reading
-rw-r--r--django/db/migrations/state.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/db/migrations/state.py b/django/db/migrations/state.py
index 4f65a12c6d..ab4aaf6e3e 100644
--- a/django/db/migrations/state.py
+++ b/django/db/migrations/state.py
@@ -8,7 +8,7 @@ from django.db.models.fields.related import do_pending_lookups
from django.db.models.fields.proxy import OrderWrt
from django.conf import settings
from django.utils import six
-from django.utils.encoding import force_text
+from django.utils.encoding import force_text, smart_text
from django.utils.module_loading import import_string
@@ -255,7 +255,7 @@ class ModelState(object):
@classmethod
def force_text_recursive(cls, value):
if isinstance(value, six.string_types):
- return six.text_type(value)
+ return smart_text(value)
elif isinstance(value, list):
return [cls.force_text_recursive(x) for x in value]
elif isinstance(value, tuple):