From 5f98142057f287da544286d7612813c8e1ba60a2 Mon Sep 17 00:00:00 2001 From: Kenneth Lee Date: Mon, 22 Jul 2024 15:45:33 +0100 Subject: [PATCH] Don't replay 'none' option on courses selected --- .../hours_teaching_eligible_subjects_form.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/forms/journeys/further_education_payments/hours_teaching_eligible_subjects_form.rb b/app/forms/journeys/further_education_payments/hours_teaching_eligible_subjects_form.rb index f181117f74..727b80a268 100644 --- a/app/forms/journeys/further_education_payments/hours_teaching_eligible_subjects_form.rb +++ b/app/forms/journeys/further_education_payments/hours_teaching_eligible_subjects_form.rb @@ -34,7 +34,9 @@ def save private def course_descriptions(course_field) - journey_session.answers.public_send(course_field).map { |course| + journey_session.answers.public_send(course_field).reject { |course| + course == "none" + }.map { |course| course_option_description(course, i18n_form_namespace: course_field).html_safe } end