From 38362a12762d94e326a70fa5d1cce9ff2c80c0c5 Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Fri, 29 Aug 2008 21:48:40 +0000 Subject: [PATCH] Fixed a missing piece of [8721]. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8723 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- 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 369674563a..2764a87ca8 100644 --- a/django/db/models/fields/related.py +++ b/django/db/models/fields/related.py @@ -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)