Code

Opened 6 years ago

Closed 5 years ago

Last modified 3 years ago

#9665 closed (fixed)

Formset::_get_ordered_forms() code documentation incorrectly describes logic.

Reported by: mark_hildreth Owned by: nobody
Component: Forms Version: master
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The code comment for _get_ordered_forms (django/forms/formsets.py, line: 142-143), reads as followed:

Returns a list of form in the order specified by the incoming data.
Raises an AttributeError if deletion is not allowed.

This should say that it raises an AttributeError if ordering is not allow.

Attachments (1)

GetOrderedFormsComment.patch (639 bytes) - added by mark_hildreth 6 years ago.

Download all attachments as: .zip

Change History (5)

Changed 6 years ago by mark_hildreth

comment:1 Changed 5 years ago by anonymous

  • milestone post-1.0 deleted

Milestone post-1.0 deleted

comment:2 Changed 5 years ago by jacob

  • milestone set to 1.1
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:3 Changed 5 years ago by jkocherhans

  • Resolution set to fixed
  • Status changed from new to closed

(In [10206]) Fixed #9587. Formset.is_valid() now returns True if an invalid form is marked for deletion. Thanks for the test and intial patch, kratorius.
Note that this leaves the form and formset errors alone. Those forms still have errors, it's just that it doesn't matter that they're invalid in the context of the formset and deletion.
Also fixed #9665 while I was in there. Thanks, mark_hildreth.

comment:4 Changed 3 years ago by jacob

  • milestone 1.1 deleted

Milestone 1.1 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.