id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux
20323 BaseFormsetSet.total_form_count seems to ignore absolute_maximum/MAX_NUM_FORM_COUNT once form is bound dpn nobody "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!
def total_form_count(self):
""""""Returns the total number of forms in this FormSet.""""""
if self.is_bound:
return self.management_form.cleaned_data[MAX_NUM_FORM_COUNT]" Bug closed Forms 1.5 Normal needsinfo dpn@… bmispelon@… Unreviewed 0 0 0 0 0 0