diff --git a/CHANGES/1238.bugfix b/CHANGES/1238.bugfix new file mode 100644 index 00000000..7f5e19d8 --- /dev/null +++ b/CHANGES/1238.bugfix @@ -0,0 +1 @@ +Fixed blocklist entries API to support `isnull` filter lookup on `version` to uniquely identify name-only entries. diff --git a/pulp_python/app/viewsets.py b/pulp_python/app/viewsets.py index e27bd76f..58a41187 100644 --- a/pulp_python/app/viewsets.py +++ b/pulp_python/app/viewsets.py @@ -260,7 +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"]} + filterset_fields = {"name": ["exact"], "version": ["exact", "isnull"], "filename": ["exact"]} ordering = ("-pulp_created",) DEFAULT_ACCESS_POLICY = {