Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#14027 closed (fixed)

reverse(None) returns an unnamed URL, instead of raising an exception

Reported by: Alex Gaynor Owned by: nobody
Component: Core (Other) 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

If your project has an unnamed URL reverse(None) returns the last one, instead of raising an exception as one might expect.

Attachments (2)

django-reverse-none.diff (1.3 KB) - added by Alex Gaynor 6 years ago.
django-reverse-none.2.diff (1.3 KB) - added by Alex Gaynor 6 years ago.
Apparently widow'd comments are more important than 79 col zealotry :)

Download all attachments as: .zip

Change History (5)

Changed 6 years ago by Alex Gaynor

Attachment: django-reverse-none.diff added

comment:1 Changed 6 years ago by Alex Gaynor

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedAccepted

Changed 6 years ago by Alex Gaynor

Attachment: django-reverse-none.2.diff added

Apparently widow'd comments are more important than 79 col zealotry :)

comment:2 Changed 6 years ago by Russell Keith-Magee

Resolution: fixed
Status: newclosed

(In [13499]) Fixed #14027 -- Ensure that reverse() raises an exception when you try to reverse None. Thanks to Alex for the report and patch.

comment:3 Changed 6 years ago by Russell Keith-Magee

(In [13500]) [1.2.X] Fixed #14027 -- Ensure that reverse() raises an exception when you try to reverse None. Thanks to Alex for the report and patch.

Backport of r13499 from trunk.

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