Skip to content
Snippets Groups Projects
Commit 5bc18526 authored by Konrad Mohrfeldt's avatar Konrad Mohrfeldt :koala:
Browse files

refactor: use django_filters FilterSet for APITimeSlotViewSet

This change re-implements all existing collection filters for the
APITimeSlotViewSet with a FilterSet. No breaking changes are expected,
though there are some changes in semantics:

* The start and end query parameters no longer need to be specified
  together. If users only want to modify the start or end date they
  can now do that.
  If start is specified and end is not, end will be start + 60 days.
* If end was not set it would default to start + 60 days at 00:00.
  This is now fixed and end will be start + 60 days at 23:59:59.
* end now uses time.max, which selects the latest possible time on
  the specified date.
* The surrounding-filter now uses the value of the start filter
  by default. There might not be a use-case for this, but it seemed
  like a good default.
* All filters are now applied in series. This wasn’t the case for
  every filter, e.g. the surrounding-filter would return early.
parent b25d45d7
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !20. Comments created here will be created in the context of that merge request.
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment