From 91b71165d1fb104a60503451f4c59ffefeccf46d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20=22decko=22=20de=20Brito?= Date: Fri, 6 Feb 2026 11:14:19 -0300 Subject: [PATCH] Add the contains filter for the name and author fields in the python content endpoint. --- CHANGES/1096.feature | 1 + pulp_python/app/viewsets.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 CHANGES/1096.feature diff --git a/CHANGES/1096.feature b/CHANGES/1096.feature new file mode 100644 index 00000000..6e354255 --- /dev/null +++ b/CHANGES/1096.feature @@ -0,0 +1 @@ +Added the `contains` filter to `name` and `author` fields for the Content endpoint. diff --git a/pulp_python/app/viewsets.py b/pulp_python/app/viewsets.py index a14f1fe3..c9c9c314 100644 --- a/pulp_python/app/viewsets.py +++ b/pulp_python/app/viewsets.py @@ -337,8 +337,8 @@ class PythonPackageContentFilter(core_viewsets.ContentFilter): class Meta: model = python_models.PythonPackageContent fields = { - "name": ["exact", "in"], - "author": ["exact", "in"], + "name": ["exact", "in", "contains"], + "author": ["exact", "in", "contains"], "packagetype": ["exact", "in"], "requires_python": ["exact", "in", "contains"], "filename": ["exact", "in", "contains"],