Code

Opened 5 years ago

Closed 5 years ago

Last modified 3 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 mattmcc 5 years ago.

Download all attachments as: .zip

Change History (6)

Changed 5 years ago by mattmcc

comment:1 Changed 5 years ago by mattmcc

  • 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 5 years ago by SmileyChris

  • Triage Stage changed from Unreviewed to Ready for checkin

comment:3 Changed 5 years ago by mattmcc

  • milestone set to 1.2

comment:4 Changed 5 years ago by adrian

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

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

comment:5 Changed 3 years ago by jacob

  • milestone 1.2 deleted

Milestone 1.2 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.