dropdowns defaulting to a lone value cause edit_inline objects with core=True to try to be saved
|Reported by:||Owned by:||nobody|
|Cc:||gary.wilson@…||Triage Stage:||Design decision needed|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
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
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