Modify

Opened 15 years ago

Closed 14 years ago

#4878 closed defect (fixed)

[PATCH] "'NoneType' object is unsubscriptable" error

Reported by: Mitar Owned by: Noah Kantrowitz
Priority: low Component: MasterTicketsPlugin
Severity: minor Keywords:
Cc: Mitar Trac Release: 0.11

Description

I am getting this error when trying to open a page of an nonexistent ticket in Trac:

Traceback (most recent call last):
  File "/usr/local/lib/python2.5/site-packages/Trac-0.11.2.1-py2.5.egg/trac/web/main.py", line 240, in dispatch
    self._post_process_request(req)
  File "/usr/local/lib/python2.5/site-packages/Trac-0.11.2.1-py2.5.egg/trac/web/main.py", line 310, in _post_process_request
    f.post_process_request(req, *(None,)*extra_arg_count)
  File "/usr/local/lib/python2.5/site-packages/TracMasterTickets-2.1.3-py2.5.egg/mastertickets/web_ui.py", line 44, in post_process_request
    tkt = data['ticket']
TypeError: 'NoneType' object is unsubscriptable

Attachments (1)

trac-hacks-4878-patch.diff (637 bytes) - added by Frau Boonekamp 15 years ago.

Download all attachments as: .zip

Change History (4)

Changed 15 years ago by Frau Boonekamp

Attachment: trac-hacks-4878-patch.diff added

comment:1 Changed 15 years ago by Frau Boonekamp

Summary: "'NoneType' object is unsubscriptable" error[PATCH] "'NoneType' object is unsubscriptable" error

This patch tests the data parameter first. It is None if the ticket is invalid.

comment:3 Changed 14 years ago by Frau Boonekamp

Resolution: fixed
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Noah Kantrowitz.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.