From 9375c67cf581fad8523708e3def3271cfccf0ef1 Mon Sep 17 00:00:00 2001 From: Rachael Booth Date: Tue, 15 Oct 2024 10:48:05 +0100 Subject: [PATCH] Make error_display_label function deal with the fact that blank will be empty rather than nil --- app/models/form/question.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/models/form/question.rb b/app/models/form/question.rb index d0c428c72..fe4856fae 100644 --- a/app/models/form/question.rb +++ b/app/models/form/question.rb @@ -222,7 +222,15 @@ class Form::Question end def error_display_label - label = error_label || check_answer_label || header || id.humanize + label = if error_label.present? + error_label + elsif check_answer_label.present? + check_answer_label + elsif header.present? + header + else + id.humanize + end format_ending(label) end