def add_fields(self, form, index):
super().add_fields(form, index)
}}}
This passes the existing test suite so suggests yes, or that the test
suite is missing important cases.
From my shaky grasp of model field internals the extra lines set the value
of the field attname (e.g. user_id) attribute, but this is already set by
the earlier setattr call updating form.instance. I feel like I'm missing
something here but it seems to work so...?
Cheers
LJS
--
Ticket URL: <https://code.djangoproject.com/ticket/29474>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* has_patch: 0 => 1
* stage: Unreviewed => Ready for checkin
Comment:
The simplification looks possible since
4c2f546b55c029334d22e69bb29db97f9356faa3.
[https://github.com/django/django/pull/10034 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/29474#comment:1>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"236bcfea429d6b0c6b3dcd102c09d3a4c75b84d8" 236bcfea]:
{{{
#!CommitTicketReference repository=""
revision="236bcfea429d6b0c6b3dcd102c09d3a4c75b84d8"
Fixed #29474 -- Simplified BaseInlineFormset.save_new().
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/29474#comment:2>