Opened 17 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: Jyrki Pulliainen <jyrki.pulliainen@…> 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 Jyrki Pulliainen <jyrki.pulliainen@…>, 17 years ago

Cc: jyrki.pulliainen@… added

comment:2 by Gary Wilson <gary.wilson@…>, 17 years ago

Summary: Validators should not be run if core=True fields are empty when editing inlineValidators should not be run if core=True fields are empty when using edit_inline
Triage Stage: UnreviewedAccepted

comment:3 by Brian Rosner, 16 years ago

Resolution: fixed
Status: newclosed

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.

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