From 59d89001bc1bc3dccec234ade9f9262604804f89 Mon Sep 17 00:00:00 2001 From: Gerrod Date: Thu, 26 Mar 2026 14:06:04 -0400 Subject: [PATCH] Avoid evaluating simple view content queryset Backport the simple view optimization from pulp_python#1164. Assisted By: Codex cherry picked from commit b1a17b05db29b76b32bb1342b7430383a84ab110 --- pulp_python/app/pypi/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pulp_python/app/pypi/views.py b/pulp_python/app/pypi/views.py index 3a422aae..a22ab153 100644 --- a/pulp_python/app/pypi/views.py +++ b/pulp_python/app/pypi/views.py @@ -360,7 +360,7 @@ def retrieve(self, request, path, package): releases = self.pull_through_package_simple(normalized, path, self.distribution.remote) elif self.should_redirect(repo_version=repo_ver): return redirect(urljoin(self.base_content_url, f"{path}/simple/{normalized}/")) - if content: + if content is not None: local_packages = content.filter(name__normalize=normalized) packages = local_packages.annotate( active_membership=FilteredRelation(