Django

Code

Ticket #3043 (closed: fixed)

Opened 2 years ago

Last modified 4 months ago

Validators should not be run if core=True fields are empty when using edit_inline

Reported by: Jyrki Pulliainen <jyrki.pulliainen@gmail.com> Assigned to: nobody
Milestone: Component: django.contrib.admin
Version: SVN Keywords:
Cc: jyrki.pulliainen@gmail.com Triage Stage: Accepted
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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.

Attachments

Change History

02/17/07 15:41:18 changed by Jyrki Pulliainen <jyrki.pulliainen@gmail.com>

  • cc set to jyrki.pulliainen@gmail.com.

02/17/07 22:58:48 changed by Gary Wilson <gary.wilson@gmail.com>

  • summary changed from Validators should not be run if core=True fields are empty when editing inline to Validators should not be run if core=True fields are empty when using edit_inline.
  • stage changed from Unreviewed to Accepted.

08/01/08 10:36:15 changed by brosner

  • status changed from new to closed.
  • resolution set to fixed.

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.


Add/Change #3043 (Validators should not be run if core=True fields are empty when using edit_inline)




Change Properties
Action