Skip to content

Commit adec9f9

Browse files
authored
Merge pull request #1097 from decko/add_name__contains_filter_content_endpoint_
Add the contains filter for the name and author fields in the python content endpoint.
2 parents 217356e + 91b7116 commit adec9f9

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

CHANGES/1096.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added the `contains` filter to `name` and `author` fields for the Content endpoint.

pulp_python/app/viewsets.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,8 @@ class PythonPackageContentFilter(core_viewsets.ContentFilter):
337337
class Meta:
338338
model = python_models.PythonPackageContent
339339
fields = {
340-
"name": ["exact", "in"],
341-
"author": ["exact", "in"],
340+
"name": ["exact", "in", "contains"],
341+
"author": ["exact", "in", "contains"],
342342
"packagetype": ["exact", "in"],
343343
"requires_python": ["exact", "in", "contains"],
344344
"filename": ["exact", "in", "contains"],

0 commit comments

Comments
 (0)