diff --git a/atst/domain/requests.py b/atst/domain/requests.py index 3986a849..23290085 100644 --- a/atst/domain/requests.py +++ b/atst/domain/requests.py @@ -150,3 +150,7 @@ class Requests(object): @classmethod def is_pending_financial_verification(cls, request): return request.status == RequestStatus.PENDING_FINANCIAL_VERIFICATION + + @classmethod + def is_pending_ccpo_approval(cls, request): + return request.status == RequestStatus.PENDING_CCPO_APPROVAL diff --git a/atst/routes/requests/index.py b/atst/routes/requests/index.py index 57e7e63a..5b7984ee 100644 --- a/atst/routes/requests/index.py +++ b/atst/routes/requests/index.py @@ -37,11 +37,8 @@ def requests_index(): mapped_requests = [map_request(r) for r in requests] - pending_fv_count = [ - True for r in requests if Requests.is_pending_financial_verification(r) - ] - pending_fv = len(pending_fv_count) > 1 - pending_ccpo = len(pending_fv_count) != len(mapped_requests) + pending_fv = any(Requests.is_pending_financial_verification(r) for r in requests) + pending_ccpo = any(Requests.is_pending_ccpo_approval(r) for r in requests) return render_template( "requests.html",