Opened 18 years ago
Closed 16 years ago
#3043 closed defect (fixed)
Validators should not be run if core=True fields are empty when using edit_inline
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | normal | Keywords: | |
Cc: | jyrki.pulliainen@… | Triage Stage: | Accepted |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
An example class for demonstration:
class Foo(models.Model): field1 = models.TextField(validator_list=[RequiredIfOtherFieldNotGiven('field2')]) field2 = models.TextField() filed3 = models.TextField(core=True) relates = models.ForeignKey(SomeGreaterModel, edit_inline=models.STACKED)
In this case, if object of class Foo is edited inline in SomeGreaterModel, it cannot be deleted since if field1, field2 and field3 are empty, the validator does not validate and it wont let you to save SomeGreaterModel instance.
Change History (3)
comment:1 by , 18 years ago
Cc: | added |
---|
comment:2 by , 18 years ago
Summary: | Validators should not be run if core=True fields are empty when editing inline → Validators should not be run if core=True fields are empty when using edit_inline |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:3 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
oldforms is going away and is no longer supported.
core=True
is also no longer used in the admin since the merge of newforms-admin in [7967]. Therefore this has been effectively fixed.