Opened 6 years ago

Closed 6 years ago

#29696 closed Bug (fixed)

BaseModelFormSet.initial_form_count() incorrectly treats data={} as an unbound form

Reported by: Jon Dufresne Owned by: nobody
Component: Forms Version: 2.1
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

BaseModelFormSet.initial_form_count() uses if not (self.data or self.files) which doesn't distinguish between an unbound form and data={}.

PR

Change History (2)

comment:1 by Tim Graham, 6 years ago

Summary: BaseModelFormSet.initial_form_count() uses incorrect condition for checking if the form is boundBaseModelFormSet.initial_form_count() incorrectly treats data={} as an unbound form
Triage Stage: AcceptedReady for checkin

comment:2 by Tim Graham <timograham@…>, 6 years ago

Resolution: fixed
Status: newclosed

In ef87b38e:

Fixed #29696 -- Prevented BaseModelFormSet.initial_form_count()'s from treating data={} as unbound.

Note: See TracTickets for help on using tickets.
Back to Top