Convert created & last_updated filters in ChangeLoggedModelFilterSet to MultiValueDateTimeFilter #6726

Closed
opened 2025-12-29 19:44:32 +01:00 by adam · 0 comments
Owner

Originally created by @jeremystretch on GitHub (Jul 27, 2022).

Originally assigned to: @jeremystretch on GitHub.

Proposed Changes

Currently, the ChangeLoggedModelFilterSet class explicitly defines base, gte, and lte filters for the created and last_updated fields. We should replace these with a single MultiValueDateTimeFilter for each field.

Justification

Using MultiValueDateTimeFilter will trigger BaseFilterSet to automatically add the lte and gte lookups, as well as others. It will also facilitate the use of multiple filter values.

Originally created by @jeremystretch on GitHub (Jul 27, 2022). Originally assigned to: @jeremystretch on GitHub. ### Proposed Changes Currently, the ChangeLoggedModelFilterSet class explicitly defines base, `gte`, and `lte` filters for the `created` and `last_updated` fields. We should replace these with a single MultiValueDateTimeFilter for each field. ### Justification Using MultiValueDateTimeFilter will trigger BaseFilterSet to automatically add the `lte` and `gte` lookups, as well as others. It will also facilitate the use of multiple filter values.
adam added the status: acceptedtype: housekeepingbeta labels 2025-12-29 19:44:32 +01:00
adam closed this issue 2025-12-29 19:44:32 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6726