[Django] #29696: BaseModelFormSet.initial_form_count() uses incorrect condition for checking if the form is bound

2 views
Skip to first unread message

Django

unread,
Aug 21, 2018, 9:58:51 AM8/21/18
to django-...@googlegroups.com
#29696: BaseModelFormSet.initial_form_count() uses incorrect condition for checking
if the form is bound
----------------------------------------+------------------------
Reporter: Jon Dufresne | Owner: nobody
Type: Bug | Status: new
Component: Forms | Version: 2.1
Severity: Normal | Keywords:
Triage Stage: Accepted | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
----------------------------------------+------------------------
`BaseModelFormSet.initial_form_count()` uses `if not (self.data or
self.files)` which doesn't distinguish between an unbound form and
`data={}`.

[https://github.com/django/django/pull/10323 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/29696>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Aug 21, 2018, 10:01:43 AM8/21/18
to django-...@googlegroups.com
#29696: BaseModelFormSet.initial_form_count() incorrectly treats data={} as an
unbound form
-------------------------------------+-------------------------------------

Reporter: Jon Dufresne | Owner: nobody
Type: Bug | Status: new
Component: Forms | Version: 2.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/29696#comment:1>

Django

unread,
Aug 21, 2018, 10:02:27 AM8/21/18
to django-...@googlegroups.com
#29696: BaseModelFormSet.initial_form_count() incorrectly treats data={} as an
unbound form
-------------------------------------+-------------------------------------
Reporter: Jon Dufresne | Owner: nobody
Type: Bug | Status: closed
Component: Forms | Version: 2.1
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"ef87b38ef7b07a5a9b4ee424a04a9811836dee39" ef87b38e]:
{{{
#!CommitTicketReference repository=""
revision="ef87b38ef7b07a5a9b4ee424a04a9811836dee39"
Fixed #29696 -- Prevented BaseModelFormSet.initial_form_count()'s from
treating data={} as unbound.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/29696#comment:2>

Reply all
Reply to author
Forward
0 new messages