From ff5c1ddd264d2708b5ba67ffd92e747d0eedd550 Mon Sep 17 00:00:00 2001 From: baarkerlounger Date: Mon, 15 Nov 2021 10:33:22 +0000 Subject: [PATCH] Fix major repairs date --- app/controllers/case_logs_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/case_logs_controller.rb b/app/controllers/case_logs_controller.rb index 8eb60af6a..1f6936520 100644 --- a/app/controllers/case_logs_controller.rb +++ b/app/controllers/case_logs_controller.rb @@ -107,6 +107,8 @@ private day = params["case_log"]["#{question_key}(3i)"] month = params["case_log"]["#{question_key}(2i)"] year = params["case_log"]["#{question_key}(1i)"] + next unless day.present? && month.present? && year.present? + result[question_key] = Date.new(year.to_i, month.to_i, day.to_i) end next unless question_params