adhocracy4
adhocracy4 copied to clipboard
WIP filters: when invalid filter value, use default value if there is one
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.
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
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