[newforms-admin] inline editing with more than one foreign key to same model
|Reported by:||duke@…||Owned by:||nobody|
|Severity:||Keywords:||m2m fk inline foreign key|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Given the following: 'ModelB' is edited inline with 'ModelA', and ModelB has more than one foreign key to ModelA.
If any of the foreign key fields in ModelB are left blank, then they should default to the value currently being added in ModelA.
In the case where there are no ModelA objects all foreign key fields in ModelB will be set to the object currently being added in ModelA - a probable combination for this type of model anyway.
http://code.djangoproject.com/browser/django/branches/newforms-admin/docs/admin.txt#L536 mostly solved my problem for an inline interface for this type of model, however if I leave the second foreign key reference blank I get an error indicating that a selection is required. I think it'd be better to just have it use the value being entered in the field that was specified as 'fk_name'.