Commit 38362a12 authored by Malcolm Tredinnick's avatar Malcolm Tredinnick
Browse files

Fixed a missing piece of [8721].


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8723 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent f3e088d2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -850,7 +850,7 @@ class ManyToManyField(RelatedField, Field):
        # specify *what* on my non-reversible relation?!"), so we set it up
        # automatically. The funky name reduces the chance of an accidental
        # clash.
        if self.rel.symmetrical and self.rel.related_name is None:
        if self.rel.symmetrical and self.rel.to == "self" and self.rel.related_name is None:
            self.rel.related_name = "%s_rel_+" % name

        super(ManyToManyField, self).contribute_to_class(cls, name)