mirror of
https://github.com/django/django.git
synced 2025-10-26 15:16:09 +00:00
Fixed #1600 -- Renamed ManyToMany to ManyToManyRel so people get a clearer error if they use ManyToMany instead of ManyToManyField
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2648 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -781,7 +781,7 @@ def get_validation_errors(outfile):
|
||||
except meta.FieldDoesNotExist:
|
||||
e.add(opts, '"unique_together" refers to %s, a field that doesn\'t exist. Check your syntax.' % field_name)
|
||||
else:
|
||||
if isinstance(f.rel, meta.ManyToMany):
|
||||
if isinstance(f.rel, meta.ManyToManyRel):
|
||||
e.add(opts, '"unique_together" refers to %s. ManyToManyFields are not supported in unique_together.' % f.name)
|
||||
return len(e.errors)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user