def _find_review_request_object(review_request_id, local_site):
 q = ReviewRequest.objects.all()
 if local_site:
  q = q.filter(local_site=local_site, local_id=review_request_id)
 else:
  q = q.filter(pk=review_request_id)
 try:
  q = q.select_related(u'submitter', u'repository')
  return q.get()
 except ReviewRequest.DoesNotExist:
  raise Http404

def _find_review_request_object ( review_request_id , local_site ) : q = ReviewRequest . objects . all ( ) if local_site : q = q . filter ( local_site = local_site , local_id = review_request_id ) else : q = q . filter ( pk = review_request_id ) try : q = q . select_related ( u'submitter' , u'repository' ) return q . get ( ) except ReviewRequest . DoesNotExist : raise Http404
finds a review request given an id and an optional localsite name .