Patch: edit_inline and default on fields don't work together
The empty lines in the edit_inline table (I am using the TABULAR format) don't work nicely together - the empty fields are not set to default values when I define those in the models. Either the system should use the default values when a field that can't be blank is passed in as blank or it should initialize the field to the default values (the latter being more consistent I think). At the moment you will get SQL exceptions if you don't enter data for new lines where fields are defined as NOT NULL in the database.
Change History
(3)
Summary: |
edit_inline and default on fields don't work together → Patch: edit_inline and default on fields don't work together
|
Resolution: |
→ fixed
|
Status: |
new → closed
|
checked a bit more on this one: it only happens with the num_extra_on_change lines when editing an existing object with a related list of objects that are edited inline in tabular form. If I add a new object, default is set accordingly. Only the additional empty lines on edit are missing the default value. I have a patch to solve the problem: this one will populate a field_default based on the field we are looking at.