#22628 closed Bug (fixed)
min_num on formsets should not just be added to extra.
Reported by: | Stephen Burrows | Owned by: | Stephen Burrows |
---|---|---|---|
Component: | Forms | Version: | 1.7-beta-2 |
Severity: | Release blocker | Keywords: | |
Cc: | Tim Graham | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The current implementation is slightly broken.
I would set min_num=3 if there should be at least three things. I would set extra=3 if I wanted three blank forms presented.
The implementation that was added in 1.7 means that there will *always* be six blank forms - initial data is *not* taken into account.
To put it another way, if min_num is 3, and extra is 2, and there is initial data for two forms, I would expect to have either 4 forms (2 extra on top of existing objects) or 5 forms (2 extra on top of the minimum.) With the code as it is, I will instead get seven forms - two for the existing objects, and an additional seven from extra.
See note on #9532.
(Is this a release blocker, since it's a bug in a new feature?)
Change History (6)
comment:1 by , 10 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 10 years ago
Cc: | added |
---|---|
Severity: | Normal → Release blocker |
Triage Stage: | Unreviewed → Accepted |
comment:3 by , 10 years ago
comment:5 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Pull request: ticket/22628