diff --git a/app/helpers/tasklist_helper.rb b/app/helpers/tasklist_helper.rb index 148f2f1e7..3b3afaa4e 100644 --- a/app/helpers/tasklist_helper.rb +++ b/app/helpers/tasklist_helper.rb @@ -29,7 +29,8 @@ module TasklistHelper path = if subsection.is_started?(case_log) "case_log_#{subsection.id}_check_answers_path" else - "case_log_#{subsection.pages.first.id}_path" + next_page = subsection.pages.first.routed_to?(case_log) ? subsection.pages.first.id : case_log.form.next_page(subsection.pages.first, case_log) + "case_log_#{next_page}_path" end send(path, case_log) end