[Django] #20403: Cannot remove records from a formset that exceeds max_num (with validate_max)

4 views
Skip to first unread message

Django

unread,
May 13, 2013, 3:48:31 PM5/13/13
to django-...@googlegroups.com
#20403: Cannot remove records from a formset that exceeds max_num (with
validate_max)
--------------------------------------+------------------------
Reporter: carljm | 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 |
--------------------------------------+------------------------
Originally reported by "yoyoma" in #20333:

When {{{validate_max}}} is in effect, but {{{max_num}}} has already been
exceeded (i.e., if I turn down {{{max_num}}} after users create objects)
Django doesn't allow the user to even delete the existing records, meaning
there is no way to remedy the situation. (see
http://cl.ly/image/1k1Z1j2L2J3f - I merely checked the "delete" checkbox
without adding any new "uploads" or editing the existing ones)

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

Django

unread,
May 13, 2013, 3:53:58 PM5/13/13
to django-...@googlegroups.com
#20403: Cannot remove records from a formset that exceeds max_num (with
validate_max)
------------------------+------------------------------------

Reporter: carljm | Owner: nobody
Type: Bug | Status: new
Component: Forms | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

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

* stage: Unreviewed => Accepted


Comment:

I think for a formset with `can_delete=True`, it would be reasonable for
the max-validation to exclude rows-to-be-deleted.

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

Django

unread,
May 20, 2013, 4:09:01 AM5/20/13
to django-...@googlegroups.com
#20403: Cannot remove records from a formset that exceeds max_num (with
validate_max)
------------------------+------------------------------------
Reporter: carljm | Owner: ryankask
Type: Bug | Status: assigned
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 ryankask):

* owner: nobody => ryankask
* status: new => assigned
* has_patch: 0 => 1


Comment:

I've opened this [[https://github.com/django/django/pull/1185|pull
request]] to solve this.

Any feedback?

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

Django

unread,
May 20, 2013, 12:14:25 PM5/20/13
to django-...@googlegroups.com
#20403: Cannot remove records from a formset that exceeds max_num (with
validate_max)
------------------------+------------------------------------
Reporter: carljm | Owner: ryankask
Type: Bug | Status: closed
Component: Forms | Version: master
Severity: Normal | Resolution: fixed
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 Carl Meyer <carl@…>):

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


Comment:

In [changeset:"4280217f31fc634d320b0cf30bcb6d582b19d784"]:
{{{
#!CommitTicketReference repository=""
revision="4280217f31fc634d320b0cf30bcb6d582b19d784"
Fixed #20403 -- Ignore forms marked for deletion when validating max_num.
}}}

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

Reply all
Reply to author
Forward
0 new messages