diff options
| author | Claude Paroz <claude@2xlibre.net> | 2012-06-11 22:05:13 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2012-06-11 22:14:06 +0200 |
| commit | 3dd5d726d1c3bf8f5901c992d7586e5ec146bc2d (patch) | |
| tree | 128822abaf630d5d7e7b2ffed1c53cc436e31a99 /django | |
| parent | c4c7fbcc0d9264beb931b45969fc0d8d655c4f83 (diff) | |
Fixed #18463 -- Forced type() argument to be a byte string
Diffstat (limited to 'django')
| -rw-r--r-- | django/db/models/query_utils.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/django/db/models/query_utils.py b/django/db/models/query_utils.py index 5676fdce9a..a7c176fd8f 100644 --- a/django/db/models/query_utils.py +++ b/django/db/models/query_utils.py @@ -5,6 +5,7 @@ Factored out from django.db.models.query to avoid making the main module very large and/or so that they can be used by other modules without getting into circular import difficulties. """ +from __future__ import unicode_literals from django.db.backends import util from django.utils import tree @@ -177,7 +178,7 @@ def deferred_class_factory(model, attrs): overrides["Meta"] = Meta overrides["__module__"] = model.__module__ overrides["_deferred"] = True - return type(name, (model,), overrides) + return type(str(name), (model,), overrides) # The above function is also used to unpickle model instances with deferred # fields. |
