Modify

Opened 5 years ago

Closed 4 years ago

#4878 closed defect (fixed)

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

Reported by: Mitar Owned by: coderanger
Priority: low Component: MasterTicketsPlugin
Severity: minor Keywords:
Cc: mmitar@… 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 boonekamp 5 years ago.

Download all attachments as: .zip

Change History (4)

Changed 5 years ago by boonekamp

comment:1 Changed 5 years ago by boonekamp

  • Summary changed from "'NoneType' object is unsubscriptable" error to [PATCH] "'NoneType' object is unsubscriptable" error

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

comment:3 Changed 4 years ago by boonekamp

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

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from coderanger. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.