Source: PR #168 review (round 1, item #5)
If a user selects "FWCI" sort in the audit panel and then re-runs an audit on data without FWCI, sort_by retains the stale value. The switch statement falls through to the default case (no sort applied), silently returning unsorted results. Validate sort_by against available choices and reset to "collection_frequency" if invalid.
Source: PR #168 review (round 1, item #5)
If a user selects "FWCI" sort in the audit panel and then re-runs an audit on data without FWCI,
sort_byretains the stale value. The switch statement falls through to the default case (no sort applied), silently returning unsorted results. Validatesort_byagainst available choices and reset to "collection_frequency" if invalid.