mirror of
https://github.com/datahub-project/datahub.git
synced 2025-10-20 13:35:12 +00:00
fix(tableau): restart server object when reauthenticating (#12182)
Co-authored-by: Harshal Sheth <hsheth2@gmail.com>
This commit is contained in:
parent
acb76cd97c
commit
eceb799e63
@ -896,10 +896,9 @@ class TableauSiteSource:
|
|||||||
return f"/{self.config.env.lower()}{self.no_env_browse_prefix}"
|
return f"/{self.config.env.lower()}{self.no_env_browse_prefix}"
|
||||||
|
|
||||||
def _re_authenticate(self):
|
def _re_authenticate(self):
|
||||||
tableau_auth: Union[
|
# Sign-in again may not be enough because Tableau sometimes caches invalid sessions
|
||||||
TableauAuth, PersonalAccessTokenAuth
|
# so we need to recreate the Tableau Server object
|
||||||
] = self.config.get_tableau_auth(self.site_id)
|
self.server = self.config.make_tableau_client(self.site_id)
|
||||||
self.server.auth.sign_in(tableau_auth)
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def site_content_url(self) -> Optional[str]:
|
def site_content_url(self) -> Optional[str]:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user