Browse Source

Loop the subsections on the last subsection instead of declaration (#497)

pull/501/head
kosiakkatrina 3 years ago committed by GitHub
parent
commit
5b2f8ce8c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/models/form.rb

2
app/models/form.rb

@ -87,7 +87,7 @@ class Form
next_subsection_id_index = subsection_ids.index(subsection.id) + 1
next_subsection = get_subsection(subsection_ids[next_subsection_id_index])
if subsection.id == "declaration" && case_log.status != "completed"
if subsection_ids[subsection_ids.length - 1] == subsection.id && case_log.status != "completed"
next_subsection = get_subsection(subsection_ids[0])
end

Loading…
Cancel
Save