adhocracy4 icon indicating copy to clipboard operation
adhocracy4 copied to clipboard

WIP filters: when invalid filter value, use default value if there is one

Open Rineee opened this issue 2 years ago β€’ 2 comments

When the filter argument is invalid, django adds and shows the label 'All', also in the case that this isnt a 'real' choice. With this, it would now use the default value of the filter if there is one.

Rineee avatar Dec 30 '22 10:12 Rineee

Coverage report

Total coverage

Status Category Percentage Covered / Total
πŸ”΄ Statements 9.22% 105/1139
πŸ”΄ Branches 10.97% 77/702
πŸ”΄ Functions 9.54% 35/367
πŸ”΄ Lines 15.66% 548/3500

Status of coverage: 🟒 - ok, 🟑 - slightly more than threshold, πŸ”΄ - under the threshold

Report generated by πŸ§ͺjest coverage report action from ff64537bc9e68aab47624ce2720fc22738cafcbf

github-actions[bot] avatar Dec 30 '22 10:12 github-actions[bot]

So this is not working, the tests are failing as it still takes the ordering by pks.. maybe this could help? https://django-filter.readthedocs.io/en/stable/ref/filterset.html#custom-forms-using-form

Rineee avatar Jan 17 '23 16:01 Rineee