Skip to content

Commit ac9a400

Browse files
authored
Merge pull request #1401 from pulp/patchback/backports/3.36/f35abcf8691b5d2d9eb7ebf6dd0049e1f8128ac4/pr-1400
[PR #1400/f35abcf8 backport][3.36] Optimize provenance content query for integrity api
2 parents 7afa0ba + bf604cb commit ac9a400

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

‎CHANGES/+integrity-db-query.bugfix‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed the Integrity API evaluating the entire repository's content query before filtering.

‎pulp_python/app/pypi/views.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ class ProvenanceView(PyPIMixin, ViewSet):
621621
def retrieve(self, request, path, package, version, filename):
622622
"""Gets the provenance for a package."""
623623
repo_ver, content = self.get_rvc()
624-
if content:
624+
if content is not None:
625625
package_content = content.filter(
626626
name_normalized=package, version=version, filename=filename
627627
).first()

0 commit comments

Comments
 (0)