Skip to content

Commit 3cfbd5d

Browse files
committed
Add filterset to blocklist entries endpoint
closes #1229
1 parent 8fc6884 commit 3cfbd5d

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

CHANGES/1229.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added filtering by `name`, `version`, and `filename` to the blocklist entries API endpoint.

pulp_python/app/viewsets.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ class PythonBlocklistEntryViewSet(
260260
parent_lookup_kwargs = {"repository_pk": "repository__pk"}
261261
serializer_class = python_serializers.PythonBlocklistEntrySerializer
262262
queryset = python_models.PythonBlocklistEntry.objects.all()
263+
filterset_fields = {"name": ["exact"], "version": ["exact"], "filename": ["exact"]}
263264
ordering = ("-pulp_created",)
264265

265266
DEFAULT_ACCESS_POLICY = {

0 commit comments

Comments
 (0)