From 3cfbd5d5585e8073dff01cb9e71be56101219e3b Mon Sep 17 00:00:00 2001 From: Jitka Halova Date: Tue, 12 May 2026 18:06:24 +0200 Subject: [PATCH] Add filterset to blocklist entries endpoint closes #1229 --- CHANGES/1229.feature | 1 + pulp_python/app/viewsets.py | 1 + 2 files changed, 2 insertions(+) create mode 100644 CHANGES/1229.feature diff --git a/CHANGES/1229.feature b/CHANGES/1229.feature new file mode 100644 index 00000000..04104adc --- /dev/null +++ b/CHANGES/1229.feature @@ -0,0 +1 @@ +Added filtering by `name`, `version`, and `filename` to the blocklist entries API endpoint. diff --git a/pulp_python/app/viewsets.py b/pulp_python/app/viewsets.py index 4b74e0bd..e27bd76f 100644 --- a/pulp_python/app/viewsets.py +++ b/pulp_python/app/viewsets.py @@ -260,6 +260,7 @@ class PythonBlocklistEntryViewSet( parent_lookup_kwargs = {"repository_pk": "repository__pk"} serializer_class = python_serializers.PythonBlocklistEntrySerializer queryset = python_models.PythonBlocklistEntry.objects.all() + filterset_fields = {"name": ["exact"], "version": ["exact"], "filename": ["exact"]} ordering = ("-pulp_created",) DEFAULT_ACCESS_POLICY = {