Skip to content

Commit

Permalink
Fix bug causing cannot start status to incorrectly appear on verifica…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
richardpattinson committed Nov 2, 2023
1 parent b2d4f41 commit 3368006
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions app/models/assessment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ def can_decline?
any_further_information_request_failed?
elsif review?
professional_standing_request_review_failed?
elsif verify?
enough_reference_requests_reviewed? &&
all_qualification_requests_reviewed? &&
professional_standing_request_verified? && !can_review? && !can_award?
else
false
end
Expand Down Expand Up @@ -258,6 +262,14 @@ def professional_standing_request_review_passed?
end
end

def professional_standing_request_verified?
if professional_standing_request_part_of_verification?
professional_standing_request.verified?
else
true
end
end

def professional_standing_request_review_failed?
if professional_standing_request_part_of_verification?
professional_standing_request.review_failed?
Expand Down

0 comments on commit 3368006

Please sign in to comment.