mirror of
https://github.com/django/django.git
synced 2025-10-26 15:16:09 +00:00
MERGED NEW-ADMIN BRANCH (except for po/mo files, which will come in a separate commit)
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1434 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -670,12 +670,12 @@ def get_validation_errors(outfile):
|
||||
e.add(opts, '"ordering" refers to "%s", a field that doesn\'t exist.' % field_name)
|
||||
|
||||
# Check core=True, if needed.
|
||||
for rel_opts, rel_field in opts.get_inline_related_objects():
|
||||
for related in opts.get_followed_related_objects():
|
||||
try:
|
||||
for f in rel_opts.fields:
|
||||
for f in related.opts.fields:
|
||||
if f.core:
|
||||
raise StopIteration
|
||||
e.add(rel_opts, "At least one field in %s should have core=True, because it's being edited inline by %s.%s." % (rel_opts.object_name, opts.module_name, opts.object_name))
|
||||
e.add(related.opts, "At least one field in %s should have core=True, because it's being edited inline by %s.%s." % (related.opts.object_name, opts.module_name, opts.object_name))
|
||||
except StopIteration:
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user