diff --git a/django/core/management.py b/django/core/management.py index ea210af88f..5dd18ddd46 100644 --- a/django/core/management.py +++ b/django/core/management.py @@ -962,6 +962,8 @@ def get_validation_errors(outfile, app=None): # Check core=True, if needed. for related in opts.get_followed_related_objects(): + if not related.edit_inline: + continue try: for f in related.opts.fields: if f.core: diff --git a/tests/regressiontests/many_to_one_regress/__init__.py b/tests/regressiontests/many_to_one_regress/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/regressiontests/many_to_one_regress/models.py b/tests/regressiontests/many_to_one_regress/models.py new file mode 100644 index 0000000000..485e928777 --- /dev/null +++ b/tests/regressiontests/many_to_one_regress/models.py @@ -0,0 +1,13 @@ +from django.db import models + +class First(models.Model): + second = models.IntegerField() + +class Second(models.Model): + first = models.ForeignKey(First, related_name = 'the_first') + +# If ticket #1578 ever slips back in, these models will not be able to be +# created (the field names being lower-cased versions of their opposite +# classes is important here). + +API_TESTS = ""