Skip to content

Commit f35abcf

Browse files
authored
Merge pull request #1400 from gerrod3/prov-db-fix
Optimize provenance content query for integrity api
2 parents 5e5029e + 0c08c89 commit f35abcf

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)