Code

Opened 8 years ago

Closed 7 years ago

#2159 closed defect (invalid)

dropdowns defaulting to a lone value cause edit_inline objects with core=True to try to be saved

Reported by: Gary Wilson <gary.wilson@…> Owned by: nobody
Component: contrib.admin Version: master
Severity: normal Keywords:
Cc: gary.wilson@… Triage Stage: Design decision needed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Normally, defaulting to a value when it is the only selection option is fine; however, it is annoying when the object is being edited inline of the related object (even more annoying with the default of three related objects displayed). This is because, on save, the form thinks you are trying to enter an entry for the inline object when, in fact, you are not. This behavior will be seen for ForeignKey fields and CharFields using the choices parameter. They must also have core=True.

In order to have the edit_inline objects not try to get saved, user must change the selection to "---------" for each object before saving. Either "---------" should always be the default (even when there is only one selection option), or "---------" should be the default when the object is edited inline

Attachments (0)

Change History (3)

comment:1 Changed 8 years ago by Gary Wilson <gary.wilson@…>

  • Cc gary.wilson@… added

comment:2 Changed 7 years ago by Gary Wilson <gary.wilson@…>

  • Triage Stage changed from Unreviewed to Design decision needed

comment:3 Changed 7 years ago by jacob

  • Resolution set to invalid
  • Status changed from new to closed

Luckily, thankfully, there's no such thing as the horrific "core" in newforms admin, so we don't have to figure out what the hell's going on here :)

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.