[Django] #27068: Acquire form's initial data more consistently

15 views
Skip to first unread message

Django

unread,
Aug 15, 2016, 8:37:34 PM8/15/16
to django-...@googlegroups.com
#27068: Acquire form's initial data more consistently
--------------------------------------+------------------------
Reporter: jdufresne | Owner: nobody
Type: Bug | Status: new
Component: Forms | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
--------------------------------------+------------------------
In `BoundField`, sometimes initial data
[https://github.com/django/django/blob/698be78d7438aade49d3cac5ea1f9de219d33e42/django/forms/boundfield.py#L222
handles callables]. While other times,
[https://github.com/django/django/blob/698be78d7438aade49d3cac5ea1f9de219d33e42/django/forms/boundfield.py#L136
it doesn't]. This can lead to a theoretical bug when the initial data is a
callable, but the field is disabled.

Other times, the initial callable is handled, but microseconds are
[https://github.com/django/django/blob/698be78d7438aade49d3cac5ea1f9de219d33e42/django/forms/forms.py#L435
not chopped] leading to theoretical false positives that data has changed.

Initial data should be handled more consistently across all cases.

Marking as a bug due to the theoretical edge cases that can produce
unexpected results. Noticed these inconsistencies while working on #27037.

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

Django

unread,
Aug 15, 2016, 8:39:53 PM8/15/16
to django-...@googlegroups.com
#27068: Acquire form's initial data more consistently
---------------------------+--------------------------------------

Reporter: jdufresne | Owner: nobody
Type: Bug | Status: new
Component: Forms | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------+--------------------------------------
Changes (by jdufresne):

* has_patch: 0 => 1


Comment:

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

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

Django

unread,
Aug 16, 2016, 4:15:28 AM8/16/16
to django-...@googlegroups.com
#27068: Acquire form's initial data more consistently
---------------------------+------------------------------------

Reporter: jdufresne | Owner: nobody
Type: Bug | Status: new
Component: Forms | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------+------------------------------------
Changes (by claudep):

* stage: Unreviewed => Accepted


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

Django

unread,
Aug 18, 2016, 6:27:03 PM8/18/16
to django-...@googlegroups.com
#27068: Acquire form's initial data more consistently
---------------------------+---------------------------------------------

Reporter: jdufresne | Owner: nobody
Type: Bug | Status: new
Component: Forms | Version: master
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 timgraham):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/27068#comment:3>

Django

unread,
Aug 18, 2016, 8:56:10 PM8/18/16
to django-...@googlegroups.com
#27068: Acquire form's initial data more consistently
---------------------------+---------------------------------------------
Reporter: jdufresne | Owner: nobody
Type: Bug | Status: closed
Component: Forms | Version: master
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 GitHub <noreply@…>):

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


Comment:

In [changeset:"f5c6d3c8d9fa2158734858fa0a7ac917c384cb97" f5c6d3c8]:
{{{
#!CommitTicketReference repository=""
revision="f5c6d3c8d9fa2158734858fa0a7ac917c384cb97"
Fixed #27068 -- Unified form field initial data retrieval.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/27068#comment:4>

Reply all
Reply to author
Forward
0 new messages