From c6ec4c050317487a2a71e2a3160618fdf6740a25 Mon Sep 17 00:00:00 2001 From: Jack S Date: Tue, 7 Feb 2023 11:08:06 +0000 Subject: [PATCH] [CLDC-1939] Only add error if attribute is present --- app/controllers/form_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/form_controller.rb b/app/controllers/form_controller.rb index 24e3d1b32..0a2d1ad65 100644 --- a/app/controllers/form_controller.rb +++ b/app/controllers/form_controller.rb @@ -71,7 +71,7 @@ private end if session["fields"] session["fields"].each do |field, value| - if form.get_question(field, @log)&.type != "date" && @log.respond_to?(field) + if form.get_question(field, @log)&.type != "date" && @log.attributes.key?(field) @log[field] = value end end