Skip to content

Commit a3deec4

Browse files
authored
Merge pull request #1230 from jobselko/1229
[PULP-1693] Add filterset to blocklist entries endpoint
2 parents 6e22b21 + 3cfbd5d commit a3deec4

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)