Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update indexd.py #1129

Merged
merged 2 commits into from
Dec 9, 2023
Merged
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
6 changes: 4 additions & 2 deletions fence/blueprints/data/indexd.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,10 @@ def _log_signed_url_data_info(indexed_file, user_sub, requested_protocol):
acl = indexed_file.index_document.get("acl")
authz = indexed_file.index_document.get("authz")

# the behavior later on is to pick the 1st location as the signed URL if a protocol is not requested
protocol = requested_protocol or indexed_file.indexed_file_locations[0].protocol
# the behavior later on is to pick the 1st location as the signed URL if a protocol is not requested, if available
protocol = requested_protocol
if not protocol and indexed_file.indexed_file_locations:
protocol = indexed_file.indexed_file_locations[0].protocol

# figure out which bucket was used based on the protocol
bucket = ""
Expand Down
Loading