Skip to content
This repository has been archived by the owner on Aug 27, 2023. It is now read-only.

Do not search for releases when fallback disallowed #328

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pypicloud/views/simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,10 @@ def package_versions_json(context, request):

def get_fallback_packages(request, package_name, redirect=True):
"""Get all package versions for a package from the fallback_base_url"""
releases = request.locator.get_releases(package_name)
pkgs = {}
if not request.access.has_permission(package_name, "fallback"):
return pkgs
releases = request.locator.get_releases(package_name)
for release in releases:
url = release["url"]
filename = posixpath.basename(url)
Expand Down