full_clean() called too many times during formset validation
I have a formset with 3 forms in it. I had to debug some stuff with it, but then I realized the full_clean method is called 21 times when calling the formset.is_valid(), while I would expect 4 times (once for the formset itself and once for each subform). For example, a validation occurs each time the management_form property is called. While it may not cause real issues in practice, it's poor design and annoying when trying to debug and follow the validation workflow.
Change History
(10)
| Triage Stage: |
Unreviewed → Accepted
|
| Owner: |
changed from nobody to DavidFozo
|
| Status: |
new → assigned
|
| Owner: |
changed from DavidFozo to Karol Sztajerwald
|
| Triage Stage: |
Accepted → Ready for checkin
|
| Resolution: |
→ fixed
|
| Status: |
assigned → closed
|
I think I'm lacking some details to understand this. Is this for plain formsets and/or model formsets? Are the duplicated calls to
BaseFormSet.full_clean()and/or some otherfull_clean()? For example, I added some debugging in Django'stest_basic_formsetbut only sawBaseFormSet.full_clean()called once.