summaryrefslogtreecommitdiff
path: root/django/core
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2010-02-26 11:12:14 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2010-02-26 11:12:14 +0000
commita52f1dd95c87bca8c5edc69a487d1a5069ddd7cd (patch)
treed2e2d0ee5567be29386ab38e4997d0c2d0e3a973 /django/core
parent6ca3154bcd14f377ba38f1199f6053ec94e59651 (diff)
[1.1.X] Fixed #11226 -- Corrected an validation edge case with m2m relations between two models with the same class name. Thanks to pkoch for the report, and to Ramiro Morales for the patch.
Backport of r12489 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@12596 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/core')
-rw-r--r--django/core/management/validation.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/core/management/validation.py b/django/core/management/validation.py
index bc2856c127..d999c8b9b1 100644
--- a/django/core/management/validation.py
+++ b/django/core/management/validation.py
@@ -160,7 +160,7 @@ def get_validation_errors(outfile, app=None):
elif field.rel.to == cls:
seen_this_fk = True
if not seen_related_fk or not seen_this_fk:
- e.add(opts, "'%s' has a manually-defined m2m relation through model %s, which does not have foreign keys to %s and %s" % (f.name, f.rel.through, f.rel.to._meta.object_name, cls._meta.object_name))
+ e.add(opts, "'%s' is a manually-defined m2m relation through model %s, which does not have foreign keys to %s and %s" % (f.name, f.rel.through, f.rel.to._meta.object_name, cls._meta.object_name))
else:
e.add(opts, "'%s' specifies an m2m relation through model %s, which has not been installed" % (f.name, f.rel.through))