From a59024857f13409d68388f1a3b1b7e3cc086c507 Mon Sep 17 00:00:00 2001 From: MazOneTwoOne <76905544+MazOneTwoOne@users.noreply.github.com> Date: Fri, 11 Oct 2024 14:04:24 +0100 Subject: [PATCH] WIP: - initialise` CalculationResult` so it can be use by `JourneyLoggerService` --- app/controllers/forms_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/forms_controller.rb b/app/controllers/forms_controller.rb index 0ed9cfb8a..906ebca39 100644 --- a/app/controllers/forms_controller.rb +++ b/app/controllers/forms_controller.rb @@ -44,8 +44,9 @@ def calculate_early_result "gross_income_excess" => cfe_result.gross_income_excess, "type" => "gross_income" } # I think we have to set this here so we have it in the session, when calling the `JourneyLoggerService` + @model = CalculationResult.new(session_data) office_code = signed_in? && current_provider.present? ? current_provider.first_office_code : nil - JourneyLoggerService.call(assessment_id, calculation_result, @check, office_code, cookies) + JourneyLoggerService.call(assessment_id, @model, @check, office_code, cookies) end end end