#32911: django.forms.BaseFormSet.is_valid does not respect TOTAL_FORM_COUNT -----------------------------------+-------------------------------------- Reporter: Lorenzo Morandini | Owner: nobody Type: Bug | Status: closed Component: Forms | Version: 3.2 Severity: Normal | Resolution: needsinfo Keywords: form, formset | Triage Stage: Unreviewed Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -----------------------------------+-------------------------------------- Changes (by Mariusz Felisiak):
* cc: Jon Dufresne (added) * status: new => closed * resolution: => needsinfo Comment: Thanks for the report, however I have some doubts. > #29113 (ticket) does not respect TOTAL_FORM_COUNT variable anymore when validating a formset. That's not true. This was changed in b2717c7532cd35ab9e80c92c6b9f070e62e7ae88 which has nothing to do with #29113. Also, `.forms` property uses `TOTAL_FORM_COUNT` so I'm not sure how this could introduce a regression. Maybe you're modifying `TOTAL_FORM_COUNT` dynamically 🤔, but that's not really supported. Can you provide a sample project? > I consider it a bug since all the rest of the code of `BaseFormset` takes `TOTAL_FORM_COUNT` in consideration. As far as I'm aware all methods iterate over `.forms`. -- Ticket URL: <https://code.djangoproject.com/ticket/32911#comment:1> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/074.dd3565b01301e4391ea9f8d0c2957e05%40djangoproject.com.