Kaydet (Commit) 38362a12 authored tarafından Malcolm Tredinnick's avatar Malcolm Tredinnick

Fixed a missing piece of [8721].


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8723 bcc190cf-cafb-0310-a4f2-bffc1f526a37
üst f3e088d2
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment