diff --git a/app/models/case_log.rb b/app/models/case_log.rb index 9d21c4eb7..7fc274085 100644 --- a/app/models/case_log.rb +++ b/app/models/case_log.rb @@ -218,7 +218,7 @@ private enabled = form.enabled_page_questions(self) answer_options = enabled.map(&:id).include?(question.id) ? enabled.find { |q| q.id == question.id }.answer_options : [] contains_selected_answer_option = answer_options.present? ? answer_options.values.map { |x| x["value"] }.include?(public_send(question.id)) : false - if !contains_selected_answer_option && respond_to?(question.id.to_s) + if !contains_selected_answer_option && respond_to?(question.id.to_s) && (question.type == "radio" || question.type == "checkbox") public_send("#{question.id}=", nil) end end