From 941d23e54890bcc9e73734c5c1f3c82193fd97d6 Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Thu, 9 May 2013 14:13:15 +0100 Subject: [PATCH] Whoops. Need to be good and use six. --- django/db/models/fields/related.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/db/models/fields/related.py b/django/db/models/fields/related.py index 728d78ba52..7fc7a092fd 100644 --- a/django/db/models/fields/related.py +++ b/django/db/models/fields/related.py @@ -958,7 +958,7 @@ class ForeignObject(RelatedField): def resolve_related_fields(self): if len(self.from_fields) < 1 or len(self.from_fields) != len(self.to_fields): raise ValueError('Foreign Object from and to fields must be the same non-zero length') - if isinstance(self.rel.to, basestring): + if isinstance(self.rel.to, six.string_types): raise ValueError('Related model %r cannot been resolved' % self.rel.to) related_fields = [] for index in range(len(self.from_fields)):