--
Ticket URL: <https://code.djangoproject.com/ticket/16739>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* stage: Unreviewed => Accepted
* needs_tests: => 0
* needs_docs: => 0
Comment:
I confirm the bug. With this code in a `models.py`:
{{{
class GrandParent(models.Model):
number = models.IntegerField()
class Parent(GrandParent):
pass
class Child(Parent):
number = models.IntegerField()
}}}
Expected result of `./manage.py validate`:
{{{
FieldError: Local field 'number' in class 'Child' clashes with field of
similar name from base class 'GrandParent'
}}}
Actual result: no error.
I tried to write a test case in `invalid_models`, but that didn't work
because the name clash creates an exception, not a validation error.
--
Ticket URL: <https://code.djangoproject.com/ticket/16739#comment:1>
* owner: nobody => swcisel
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/16739#comment:2>
* type: Uncategorized => Bug
--
Ticket URL: <https://code.djangoproject.com/ticket/16739#comment:3>
* owner: swcisel =>
* status: assigned => new
* component: Database layer (models, ORM) => Core (System checks)
Comment:
Confirmed this is still an issue with the attached test for Django's test
suite.
--
Ticket URL: <https://code.djangoproject.com/ticket/16739#comment:4>
Comment (by karlwnw):
I think this ticket can be marked as fixed or duplicate now, fixed here
#24249.
--
Ticket URL: <https://code.djangoproject.com/ticket/16739#comment:5>
* status: new => closed
* resolution: => duplicate
Comment:
Right, thanks for checking (Tim's test is now passing well).
--
Ticket URL: <https://code.djangoproject.com/ticket/16739#comment:6>
Comment (by Leo):
Thanks guys! Great to have this cleaned up!
--
Ticket URL: <https://code.djangoproject.com/ticket/16739#comment:7>