Skip to content

Commit

Permalink
fix: propagate updated token (#54)
Browse files Browse the repository at this point in the history
Signed-off-by: Panos Vagenas <35837085+vagenas@users.noreply.github.com>
  • Loading branch information
vagenas authored Dec 7, 2022
1 parent d72ba98 commit 732a600
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions deepsearch/cps/client/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ class CpsApi:

def __init__(self, client: CpsApiClient) -> None:
self.client = client
self._create_members()

def _create_members(self):
self.projects = CpsApiProjects(self)
self.knowledge_graphs = CpsApiKnowledgeGraphs(self)
self.queries = CpsApiQueries(self)
Expand Down Expand Up @@ -140,6 +142,7 @@ def refresh_token(self, admin: bool = False):
verify_ssl=self.client.config.verify_ssl,
)
self.client = CpsApiClient(ds_config)
self._create_members() # propagate updated token

@classmethod
def default_from_env(cls) -> "CpsApi":
Expand Down

0 comments on commit 732a600

Please sign in to comment.