City-of-Helsinki / kerrokantasi

Kerro kantasi participatory democracy backend
MIT License
7 stars 16 forks source link

KER-366: Refactor hearing filters, remove next_closing filter #497

Closed danipran closed 3 months ago

danipran commented 3 months ago

Move the HearingViewSet filters in filter_queryset under HearingFilterSet instead and remove the filter_queryset override. Also removes an unused (= no requests using this parameter in the past 90 days and no references to it in kerrokantasi-ui) next_closing filter which had a questionable implementation (returning a sliced queryset in the middle of filter_queryset and skipping the rest of the filters isn't exactly expected filter_queryset behaviour).

If needed, can be replaced in the future by implementing a close_at_gt filter and using it with a limit=1 query parameter, e.g. /v1/hearing/?close_at_gt=YYYY-MM-DD&limit=1.

terovirtanen commented 3 months ago

KERROKANTASI-API branch is deployed to platta: https://kerrokantasi-pr497.api.dev.hel.ninja :rocket::rocket::rocket:

terovirtanen commented 3 months ago

KERROKANTASI-API branch is deployed to platta: https://kerrokantasi-pr497.api.dev.hel.ninja :rocket::rocket::rocket:

terovirtanen commented 3 months ago

KERROKANTASI-API branch is deployed to platta: https://kerrokantasi-pr497.api.dev.hel.ninja :rocket::rocket::rocket:

sonarcloud[bot] commented 3 months ago

Quality Gate Passed Quality Gate passed

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

terovirtanen commented 3 months ago

KERROKANTASI-API branch is deployed to platta: https://kerrokantasi-pr497.api.dev.hel.ninja :rocket::rocket::rocket: