Add some new API functions in the ReviewRequest and Review models.

Review Request #615 — Created Oct. 26, 2008 and submitted

Information

Review Board SVN (deprecated)
trunk

Reviewers

Added some new API functions to ReviewRequest and Review. These functions give us a standard way to grab the review request's draft or the user's pending review and to grab a user's pending reply to a review.

This also switches to some API functions in other places instead of hard-coding queries, and removes redundant saves immediately after a get_or_create.

It also fixes a couple potential bugs where we were querying a review to delete that may not be the review we expect. We expect to work on actual reviews, not replies, and the query in question may give us a reply in some cases.
Unit tests pass.
david
  1. 
      
  2. /trunk/reviewboard/reviews/models.py (Diff revision 1)
     
     
     
    Didn't you add symbolic constants for these?
    1. Yep. Fixing to use these.
  3.