From 40afdaf08ca7562d8908b999511cd40a432520a9 Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Sat, 8 Mar 2014 18:35:35 -0800 Subject: [PATCH] Fix weird autodetector error --- 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 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.