Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#24249 closed Bug (fixed)

Improve forbidding field shadowing in model multi-inheritance

Reported by: aron45 Owned by: nobody
Component: Database layer (models, ORM) Version: 1.7
Severity: Normal Keywords: validation
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

This is a ticket to improve #17673 for multi inheritance of grand father

class GrandFather(models.Model):
    column1 = models.IntegerField()


class Father(GrandFather):
    column2 = models.IntegerField()


class Child(Father):
    column1 = models.IntegerField()  # this should fail, but it does pass.

Change History (5)

comment:2 by Tim Graham, 9 years ago

Has patch: set
Patch needs improvement: set
Triage Stage: UnreviewedAccepted

comment:3 by Tim Graham, 9 years ago

Patch needs improvement: unset

comment:4 by Tim Graham <timograham@…>, 9 years ago

Resolution: fixed
Status: newclosed

In 4d73303ee974c5f1ea6af984d4578d817825026d:

Fixed #24249 -- Improved field shadowing validation in model multi-inheritance.

comment:5 by Tim Graham <timograham@…>, 9 years ago

In eb9fbc0b1d6497f20204d9032852a5b4ae8b2466:

[1.8.x] Fixed #24249 -- Improved field shadowing validation in model multi-inheritance.

Backport of 4d73303ee974c5f1ea6af984d4578d817825026d from master

Note: See TracTickets for help on using tickets.
Back to Top