Opened 12 years ago

Closed 11 years ago

#20403 closed Bug (fixed)

Cannot remove records from a formset that exceeds max_num (with validate_max)

Reported by: Carl Meyer Owned by: Ryan Kaskel
Component: Forms Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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)

Change History (3)

comment:1 by Carl Meyer, 12 years ago

Triage Stage: UnreviewedAccepted

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

comment:2 by Ryan Kaskel, 11 years ago

Has patch: set
Owner: changed from nobody to Ryan Kaskel
Status: newassigned

I've opened this pull request to solve this.

Any feedback?

comment:3 by Carl Meyer <carl@…>, 11 years ago

Resolution: fixed
Status: assignedclosed

In 4280217f31fc634d320b0cf30bcb6d582b19d784:

Fixed #20403 -- Ignore forms marked for deletion when validating max_num.

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