Skip to content

Commit

Permalink
cli: Ensure that the client has the session token #TASK-6992
Browse files Browse the repository at this point in the history
  • Loading branch information
juanfeSanahuja committed Sep 26, 2024
1 parent a0b8d91 commit 92ff7a7
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,13 @@ private boolean checkAutoRefresh(OpencgaCommandExecutor commandExecutor) {

public void loadSessionStudies(OpencgaCommandExecutor commandExecutor) {
Session session = commandExecutor.getSessionManager().getSession();
logger.debug("Loading session studies using token: "
+ session.getToken());
OpenCGAClient openCGAClient = commandExecutor.getOpenCGAClient();
logger.debug("openCGAClient Token: " + openCGAClient.getToken());
if(StringUtils.isEmpty(openCGAClient.getToken())) {
openCGAClient.setToken(session.getToken());
}
logger.debug("Loading session studies using token: "
+ openCGAClient.getToken());
try {
// Query the server to retrieve the studies of user projects
RestResponse<Project> res = openCGAClient.getProjectClient().search(new ObjectMap());
Expand Down

0 comments on commit 92ff7a7

Please sign in to comment.