BaseFormsetSet.total_form_count seems to ignore absolute_maximum/MAX_NUM_FORM_COUNT once form is bound
|Reported by:||David Novakovic||Owned by:||nobody|
|Cc:||dpn@…, bmispelon@…||Triage Stage:||Unreviewed|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
This can be observed in the admin with an inline that has more than 1000 rows (1000 being the default absolute_maximum). It won't save because the range of forms generated is populated from the value of TOTAL_FORMS not MAX_NUM_FORM_COUNT.
The following code seems to fix it. I'm not 100% sure its the right approach though. Happy to jig up something with tests once we know the right approach!
"""Returns the total number of forms in this FormSet."""