Skip to content

Commit aa759b1

Browse files
jobselkogerrod3
authored andcommitted
Avoid evaluating simple view content queryset
Backport the simple view optimization from pulp_python#1164. (cherry picked from commit b1a17b0)
1 parent 5a0ed6b commit aa759b1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎pulp_python/app/pypi/views.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ def retrieve(self, request, path, package):
289289
releases = self.pull_through_package_simple(normalized, path, self.distribution.remote)
290290
elif self.should_redirect(repo_version=repo_ver):
291291
return redirect(urljoin(self.base_content_url, f"{path}/simple/{normalized}/"))
292-
if content:
292+
if content is not None:
293293
packages = content.filter(name__normalize=normalized).values("filename", "sha256")
294294
local_releases = {
295295
p["filename"]: (

0 commit comments

Comments
 (0)