summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Godwin <andrew@aeracode.org>2014-03-08 18:35:35 -0800
committerAndrew Godwin <andrew@aeracode.org>2014-03-08 18:35:45 -0800
commit40afdaf08ca7562d8908b999511cd40a432520a9 (patch)
tree63ab79db1cdd65347bd05ccac037db7fa5c09b36
parent41afae4ce906838fc87d63962104cfb47991f68b (diff)
Fix weird autodetector error
-rw-r--r--django/db/models/fields/related.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/models/fields/related.py b/django/db/models/fields/related.py
index 41c020f509..6260f92de9 100644
--- a/django/db/models/fields/related.py
+++ b/django/db/models/fields/related.py
@@ -2035,7 +2035,7 @@ class ManyToManyField(RelatedField):
if getattr(self.rel, 'through', None) is not None:
if isinstance(self.rel.through, six.string_types):
kwargs['through'] = self.rel.through
- else:
+ elif not self.rel.through._meta.auto_created:
kwargs['through'] = "%s.%s" % (self.rel.through._meta.app_label, self.rel.through._meta.object_name)
# If swappable is True, then see if we're actually pointing to the target
# of a swap.