Opened 15 years ago

Closed 14 years ago

#13057 closed (duplicate)

Missing validation of child models

Reported by: Vlastimil Zíma Owned by: nobody
Component: Database layer (models, ORM) Version: 1.1
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

In Django1.1 validation of models does not report when child model has declared field with same name as one to one field that links parent model and child model.

For example:

class Parent(models.Model)
  pass

class Child(Parent)
  child = models.CharField()

raises ValueError when I want to set string value for field 'child', because

Parent.child == Child.parent.child == Child.child #OneToOneField(Child) instead CharField which is replaced

Change History (2)

comment:1 by Russell Keith-Magee, 15 years ago

Triage Stage: UnreviewedAccepted

comment:2 by niall, 14 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #14217

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