Skip to content

Commit

Permalink
Fixed a missing piece of [8721].
Browse files Browse the repository at this point in the history
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8723 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
malcolmt committed Aug 29, 2008
1 parent f3e088d commit 38362a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django/db/models/fields/related.py
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@ def contribute_to_class(self, cls, name):
# 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)
Expand Down

0 comments on commit 38362a1

Please sign in to comment.