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:07 +1000
commit157c42a976966b4d0a159e414f892ece7474180a (patch)
tree61e700fe22b90af92363b1b8d353ad47f2c82878
parent57b60f9f93f4aa660c191c54ebb30ce44e54f236 (diff)
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):