Skip to content

Commit

Permalink
Local dev: ignore tapis token if local
Browse files Browse the repository at this point in the history
  • Loading branch information
chandra-tacc committed Feb 7, 2024
1 parent dc54fea commit 4fe4fec
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/data_loading.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ def handle_exception(ex, api_message):
}
return jsonify(json_data)

def _is_local():
return data_access_type == "LOCAL"

# ----------------------------------------------------------------------------
# Updating data checks
# ----------------------------------------------------------------------------
Expand Down Expand Up @@ -454,6 +457,10 @@ def make_request_with_retry(url, cookies):

# Get Tapis token if authorized to access data files
def get_tapis_token(api_request):
if _is_local():
logger.info("Running local, not fetching tapis token.")
return None

'''Get tapis token using the session cookie. If the session is not authenticated, this will fail.'''
session_id = api_request.cookies.get("coresessionid")
if session_id is None:
Expand Down

0 comments on commit 4fe4fec

Please sign in to comment.