Skip to content

Commit 9cd3755

Browse files
committed
Add isnull filter for blocklist entry version
closes #1238
1 parent 760a28a commit 9cd3755

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

CHANGES/1238.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed blocklist entries API to support `isnull` filter lookup on `version` to uniquely identify name-only entries.

pulp_python/app/viewsets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +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"]}
263+
filterset_fields = {"name": ["exact"], "version": ["exact", "isnull"], "filename": ["exact"]}
264264
ordering = ("-pulp_created",)
265265

266266
DEFAULT_ACCESS_POLICY = {

0 commit comments

Comments
 (0)