rcpch / rcpch-audit-engine

Epilepsy12 Audit Platform
https://e12.rcpch.ac.uk/
GNU Affero General Public License v3.0
5 stars 5 forks source link

only apply filtered_case_list if not none in case_list template #951

Closed eatyourpeas closed 3 months ago

eatyourpeas commented 3 months ago

Fixes #943

Overview

Current behaviour - if a sort has been applied to a column in the the case table, the pagination buttons then fail as the filtered_case_list parameter is None. What should happen: if a sort has been applied to a column, the sort flag is passed to the htmx get request, but not the filtered_case_list, allowing pagination to proceed

Code changes

A conditional is applied in the case_list template partial to test for when filtered_case_list is None, and change the htmx get url params accordingly

Related Issues

Fixes #943