2012-02-10 16:25:22,729 Trac[main] ERROR: Internal Server Error:
Traceback (most recent call last):
File "/usr/local/python26_trac12/lib/python2.6/site-packages/Trac-0.12.3-py2.6.egg/trac/web/main.py", line 522, in _dispatch_request
dispatcher.dispatch(req)
File "/usr/local/python26_trac12/lib/python2.6/site-packages/Trac-0.12.3-py2.6.egg/trac/web/main.py", line 243, in dispatch
resp = chosen_handler.process_request(req)
File "/usr/local/python26_trac12/lib/python2.6/site-packages/Trac-0.12.3-py2.6.egg/trac/attachment.py", line 460, in process_request
return self._render_list(req, parent)
File "/usr/local/python26_trac12/lib/python2.6/site-packages/Trac-0.12.3-py2.6.egg/trac/attachment.py", line 735, in _render_list
parent))
File "/usr/local/python26_trac12/lib/python2.6/site-packages/Trac-0.12.3-py2.6.egg/trac/attachment.py", line 504, in attachment_data
'can_create': 'ATTACHMENT_CREATE' in context.perm(new_att),
File "/usr/local/python26_trac12/lib/python2.6/site-packages/Trac-0.12.3-py2.6.egg/trac/perm.py", line 553, in has_permission
return self._has_permission(action, resource)
File "/usr/local/python26_trac12/lib/python2.6/site-packages/Trac-0.12.3-py2.6.egg/trac/perm.py", line 567, in _has_permission
check_permission(action, perm.username, resource, perm)
File "/usr/local/python26_trac12/lib/python2.6/site-packages/Trac-0.12.3-py2.6.egg/trac/perm.py", line 454, in check_permission
perm)
File "build/bdist.linux-x86_64/egg/privatetickets/policy.py", line 44, in check_permission
return self.check_ticket_access(perm, resource)
File "build/bdist.linux-x86_64/egg/privatetickets/policy.py", line 58, in check_ticket_access
tkt = Ticket(self.env, res.id)
File "/usr/local/python26_trac12/lib/python2.6/site-packages/Trac-0.12.3-py2.6.egg/trac/ticket/model.py", line 61, in __init__
tkt_id = int(tkt_id)
ValueError: invalid literal for int() with base 10: ''
When navigating to a page such as
/attachment/ticket/3
, resource.id is an empty string. It looks like this issue will be fixed by replacing... and resource.id is not None
with... and resource.id
in the conditional check that occurs before the call toself.check_ticket_access(perm, resource)
.