Opened 15 years ago

Closed 15 years ago

Last modified 13 years ago

#11960 closed (fixed)

Misleading/Wrong Error: argument of type 'function' is not iterable

Reported by: pguth Owned by: nobody
Component: Core (Other) Version: 1.1
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

If the urls.py is lacking a (proper) pattern for "some_view" the following code will throw "argument of type 'function' is not iterable" when called.

return redirect(some_view)

Attachments (1)

11960-1.diff (1.3 KB ) - added by Matt McClanahan 15 years ago.

Download all attachments as: .zip

Change History (6)

by Matt McClanahan, 15 years ago

Attachment: 11960-1.diff added

comment:1 by Matt McClanahan, 15 years ago

Has patch: set

Adding a patch to check if redirect's argument is a callable object, so that it isn't tested as a string.

comment:2 by Chris Beaven, 15 years ago

Triage Stage: UnreviewedReady for checkin

comment:3 by Matt McClanahan, 15 years ago

milestone: 1.2

comment:4 by Adrian Holovaty, 15 years ago

Resolution: fixed
Status: newclosed

(In [12185]) Fixed #11960 -- Improved error message for redirects. Thanks, mattmcc

comment:5 by Jacob, 13 years ago

milestone: 1.2

Milestone 1.2 deleted

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