Closes #21257: Introduce & adopt MultiValueContentTypeFilter #367

Closed
opened 2026-04-05 16:27:39 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @jeremystretch on 2/12/2026

Closes: #21257

  • Introduce MultiValueContentTypeFilter as a multi-value variant of ContentTypeFilter
    • Did not alter behavior of ContentTypeFilter to avoid potentially breaking changes in plugins
  • Replace all usage of ContentTypeFilter internally with MultiValueContentTypeFilter
  • Updated relevant filter tests to pass iterable values (rather than strings)
  • Opportunistically replaced calls to ContentType.objects.get(app_label=x, model=y) with get_by_natural_key() to leverage caching
*Originally created by @jeremystretch on 2/12/2026* ### Closes: #21257 - Introduce MultiValueContentTypeFilter as a multi-value variant of ContentTypeFilter - Did not alter behavior of ContentTypeFilter to avoid potentially breaking changes in plugins - Replace all usage of ContentTypeFilter internally with MultiValueContentTypeFilter - Updated relevant filter tests to pass iterable values (rather than strings) - Opportunistically replaced calls to `ContentType.objects.get(app_label=x, model=y)` with `get_by_natural_key()` to leverage caching
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/netbox#367