Opened 7 years ago

Closed 7 years ago

Last modified 5 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: UI/UX:

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 7 years ago.

Download all attachments as: .zip

Change History (6)

Changed 7 years ago by Matt McClanahan

Attachment: 11960-1.diff added

comment:1 Changed 7 years ago by Matt McClanahan

Has patch: set
Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset

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

comment:2 Changed 7 years ago by Chris Beaven

Triage Stage: UnreviewedReady for checkin

comment:3 Changed 7 years ago by Matt McClanahan

milestone: 1.2

comment:4 Changed 7 years ago by Adrian Holovaty

Resolution: fixed
Status: newclosed

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

comment:5 Changed 5 years ago by Jacob

milestone: 1.2

Milestone 1.2 deleted

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