Fix problems when showing comment diff fragment errors.

Review Request #6995 — Created Feb. 28, 2015 and submitted

Information

Review Board
release-2.0.x
b3179a0...

Reviewers

A recent change regressed showing diff fragment errors. The result from
the function expected that a variable was set, but in the error case,
this variable wasn't set. We now default it to an empty list.

Still, we didn't actually show any error information for comments. This
was due to returning a HTTP 500 for the script, which prevented the
browser from executing it. We're now using a standard 200, which isn't
ideal, but works.

The error template has also been updated to factor in the comment ID for
the links, so that there aren't conflicts when clicking the "Details"
links.

Faked an error. Saw the error pages appear. Tested that the Details links
worked independently.

Description From Last Updated

'HttpResponseServerError' imported but unused

reviewbotreviewbot

list comprehension redefines 'file_attachment' from line 591

reviewbotreviewbot
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/reviews/views.py
    
    Ignored Files:
        reviewboard/static/rb/css/reviews.less
        reviewboard/templates/diffviewer/diff_fragment_error.html
        reviewboard/static/rb/css/defs.less
        reviewboard/static/rb/css/diffviewer.less
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/reviews/views.py
    
    Ignored Files:
        reviewboard/static/rb/css/reviews.less
        reviewboard/templates/diffviewer/diff_fragment_error.html
        reviewboard/static/rb/css/defs.less
        reviewboard/static/rb/css/diffviewer.less
    
    
  2. reviewboard/reviews/views.py (Diff revision 1)
     
     
    Show all issues
     'HttpResponseServerError' imported but unused
    
  3. reviewboard/reviews/views.py (Diff revision 1)
     
     
    Show all issues
     list comprehension redefines 'file_attachment' from line 591
    
  4. 
      
david
  1. Once you fix Review Bot's complaints, I'm happy.

  2. 
      
brennie
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-2.0.x (7b0f8d1)