From 8d928f08be23ca772c42cfe7b7b3e1eadb783758 Mon Sep 17 00:00:00 2001 From: Kenneth Lee Date: Sat, 7 Sep 2024 17:19:15 +0100 Subject: [PATCH] Ensure OL task outcome is specific to identity confirmation and OL --- app/models/task.rb | 4 ++++ app/views/admin/tasks/_task_outcome.html.erb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/models/task.rb b/app/models/task.rb index fe3d9d7af5..b6d2f46682 100644 --- a/app/models/task.rb +++ b/app/models/task.rb @@ -47,4 +47,8 @@ class Task < ApplicationRecord def to_param name end + + def identity_confirmation? + name == "identity_confirmation" + end end diff --git a/app/views/admin/tasks/_task_outcome.html.erb b/app/views/admin/tasks/_task_outcome.html.erb index 56b1e1ac5e..21fe35d047 100644 --- a/app/views/admin/tasks/_task_outcome.html.erb +++ b/app/views/admin/tasks/_task_outcome.html.erb @@ -10,7 +10,7 @@ This task was performed by <%= user_details(task.created_by, include_line_break: false) %> on <%= l(task.updated_at) %> <% elsif task.created_by %> This task was performed by an automated check uploaded by <%= user_details(task.created_by, include_line_break: false) %> on <%= l(task.created_at) %> - <% elsif task.claim.identity_confirmed_with_onelogin? %> + <% elsif task.identity_confirmation? && task.claim.identity_confirmed_with_onelogin? %> This task was performed by GOV.UK One Login on <%= l(task.claim.onelogin_idv_at) %> <% else %> This task was performed by an automated check on <%= l(task.created_at) %>