Prevent crashes when unable to get/create a ReviewRequestVisit.

Review Request #5959 — Created June 9, 2014 and submitted

Information

Review Board
release-1.7.x
f88f5f4...

Reviewers

Under some unknown race condition, it's possible that looking up or
creating a ReviewRequestVisit will fail when viewing a review request.
This isn't the worst thing in the world, and is likely a temporary
problem (probably due to two requests for creating the same
ReviewRequestVisit at once).

Instead of crashing, we now log the failure and continue on.

Tested a successful visit creation and a successful fetch.

Simulated a DoesNotExist and saw it log and continue on.

reviewbot
  1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
        reviewboard/reviews/views.py
      Ignored Files:
    
    
  2. 
      
reviewbot
  1. This is a review from Review Bot.
      Tool: Pyflakes
      Processed Files:
        reviewboard/reviews/views.py
      Ignored Files:
    
    
  2. 
      
david
  1. Ship It!

  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-1.7.x (f05926b)