Modify

Opened 17 years ago

Closed 17 years ago

#1727 closed defect (fixed)

adding a comment without a file doesn't work (fix included)

Reported by: tvolpini@… Owned by: Team5
Priority: normal Component: PeerReviewPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description

Trac version 0.10.3, TracCodeReview version 2.0dev

When I add a comment without attaching a file, the next dialog hangs at 'Loading...'. If I click 'Add a new Comment' in this dialog, the next dialog contains a trac internal error with the following traceback:

Traceback (most recent call last):
  File "/var/lib/python-support/python2.4/trac/web/main.py", line 387, in dispatch_request
    dispatcher.dispatch(req)
  File "/var/lib/python-support/python2.4/trac/web/main.py", line 237, in dispatch
    resp = chosen_handler.process_request(req)
  File "build/bdist.linux-x86_64/egg/codereview/peerReviewCommentCallback.py", line 44, in process_request
  File "build/bdist.linux-x86_64/egg/codereview/peerReviewCommentCallback.py", line 117, in createComment
AttributeError: 'unicode' object has no attribute 'filename'

Adding

if req.args.has_key('attachFilecheckbox'):
  checked = req.args['attachFilecheckbox']
  if checked:

before the

if req.args.has_key('FileUp'):

line (and fixing indentation, obviously) fixes the problem for me.

Attachments (0)

Change History (2)

comment:1 Changed 17 years ago by sassyn@…

can u please provide the file itself; i can't compile the file due to 'inconsistent use of tabs and spaces in indentation'

i changed the tabs, spaces etc... but no luck

thanks man

comment:2 Changed 17 years ago by Joseph Lombrozo

Resolution: fixed
Status: newclosed

(In [2577]) Check ChangeLog. Fixes #1942 and #1727.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Team5.
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.