From 7d554b284b66545c3ac4d03e47c38a4c1e2bb174 Mon Sep 17 00:00:00 2001 From: Jack <113976590+bibblobcode@users.noreply.github.com> Date: Tue, 7 Feb 2023 12:11:08 +0000 Subject: [PATCH] [CLDC-1939] Only add error if attribute is present (#1272) --- 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