Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed #1578 -- fixed a corner-case where we still wanting core=True a…
…ttributes

on a model that was not being edited inline.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@3275 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
malcolmt committed Jul 4, 2006
1 parent 4a30eff commit a778c9d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions django/core/management.py
Expand Up @@ -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:
Expand Down
Empty file.
13 changes: 13 additions & 0 deletions 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 = ""

0 comments on commit a778c9d

Please sign in to comment.