osclib/core: reviews_remaining(): provide incident_psuedo option.
This commit is contained in:
parent
9503a04b33
commit
c8cba5d2a1
@ -759,12 +759,20 @@ def review_find_last(request, user, states=['all']):
|
||||
|
||||
return None
|
||||
|
||||
def reviews_remaining(request):
|
||||
def reviews_remaining(request, incident_psuedo=False):
|
||||
reviews = []
|
||||
for review in request.reviews:
|
||||
if review.state != 'accepted':
|
||||
reviews.append(review_short(review))
|
||||
|
||||
if incident_psuedo:
|
||||
# Add review in the same style as the staging review used for non
|
||||
# maintenance projects to allow for the same wait on review.
|
||||
for action in request.actions:
|
||||
if action.type == 'maintenance_incident':
|
||||
reviews.append('maintenance_incident')
|
||||
break
|
||||
|
||||
return reviews
|
||||
|
||||
def review_short(review):
|
||||
|
Loading…
x
Reference in New Issue
Block a user