Opened 16 years ago

Closed 16 years ago

#4867 closed (fixed)

[newforms-admin] FormSet.is_valid() throws error on unbound forms

Reported by: John Shaffer <jshaffer2112@…> Owned by: Adrian Holovaty
Component: Forms Version: newforms-admin
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


It should behave like an unbound Form, and return False if self.is_bound is False.

Attachments (2)

check-is_bound.diff (658 bytes) - added by John Shaffer <jshaffer2112@…> 16 years ago.
check-is_bound.2.diff (679 bytes) - added by John Shaffer <jshaffer2112@…> 16 years ago.
A saner version.

Download all attachments as: .zip

Change History (5)

Changed 16 years ago by John Shaffer <jshaffer2112@…>

Attachment: check-is_bound.diff added

comment:1 Changed 16 years ago by John Shaffer <jshaffer2112@…>

The traceback, in case you want it:

Traceback (most recent call last):
File "C:\Documents and Settings\John\My Documents\django-trunk\django\core\handlers\" in get_response
  77. response = callback(request, *callback_args, **callback_kwargs)
File "C:\Documents and Settings\John\My Documents\django-trunk\django\contrib\auth\" in _checklogin
  17. return view_func(request, *args, **kwargs)
File "C:\Documents and Settings\John\My Documents\django-trunk\django\db\" in _commit_on_success
  194. res = func(*args, **kw)
File "C:\Documents and Settings\John\My Documents\booking\views\" in index
  59. if formset.is_valid() and formset.cleaned_data:
File "C:\Documents and Settings\John\My Documents\booking\" in is_valid
  150. return self._is_valid

  AttributeError at /booking/add-appointments/
  'AppointmentFormFormSet' object has no attribute '_is_valid'

Changed 16 years ago by John Shaffer <jshaffer2112@…>

Attachment: check-is_bound.2.diff added

A saner version.

comment:2 Changed 16 years ago by anonymous

Yo eat my dick nigga

comment:3 Changed 16 years ago by jkocherhans

Resolution: fixed
Status: newclosed

(In [6052]) Fixed #4867. FormSet.is_valid() now returns False when the FormSet is not bound. Thanks John Shaffer.

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