Fixed a missing piece of [8721].

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8723 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick 2008-08-29 21:48:40 +00:00
parent f3e088d2d9
commit 38362a1276
1 changed files with 1 additions and 1 deletions

View File

@ -850,7 +850,7 @@ class ManyToManyField(RelatedField, Field):
# specify *what* on my non-reversible relation?!"), so we set it up # specify *what* on my non-reversible relation?!"), so we set it up
# automatically. The funky name reduces the chance of an accidental # automatically. The funky name reduces the chance of an accidental
# clash. # 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 self.rel.related_name = "%s_rel_+" % name
super(ManyToManyField, self).contribute_to_class(cls, name) super(ManyToManyField, self).contribute_to_class(cls, name)