Browse Source

Make case log status rely on subsection status so they can't get out of sync

pull/619/head
baarkerlounger 3 years ago
parent
commit
deb74f97c9
  1. 3
      app/models/case_log.rb

3
app/models/case_log.rb

@ -609,7 +609,8 @@ private
end end
def all_fields_completed? def all_fields_completed?
mandatory_fields.none? { |field| public_send(field).nil? if respond_to?(field) } subsection_statuses = form.subsections.map { |subsection| subsection.status(self) }.uniq
subsection_statuses == [:completed]
end end
def all_fields_nil? def all_fields_nil?

Loading…
Cancel
Save