From 4402b8b5a2d762a25feeb310470a54a03bf639e9 Mon Sep 17 00:00:00 2001 From: baarkerlounger Date: Fri, 23 Sep 2022 14:59:43 +0100 Subject: [PATCH] Check relationship has been answered --- app/services/imports/lettings_logs_import_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/imports/lettings_logs_import_service.rb b/app/services/imports/lettings_logs_import_service.rb index b85be013d..e8c59518b 100644 --- a/app/services/imports/lettings_logs_import_service.rb +++ b/app/services/imports/lettings_logs_import_service.rb @@ -87,7 +87,7 @@ module Imports attributes["details_known_#{index}"] = details_known(index, attributes) # Trips validation - if attributes["age#{index}"].present? && attributes["age#{index}"] < 16 && attributes["relat#{index}"] != "C" && attributes["relat#{index}"] != "R" + if attributes["age#{index}"].present? && attributes["age#{index}"] < 16 && attributes["relat#{index}"].present? && attributes["relat#{index}"] != "C" && attributes["relat#{index}"] != "R" attributes["age#{index}"] = nil attributes["relat#{index}"] = nil end