Skip to content

Commit

Permalink
Merge pull request tableau#1319 from pes-magic/issue-1318
Browse files Browse the repository at this point in the history
Fixed type annotation for workbook.refresh
  • Loading branch information
jacalata committed Nov 16, 2023
2 parents 2b9b663 + 25a59d0 commit 400c966
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tableauserverclient/server/endpoint/workbooks_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ def get_by_id(self, workbook_id: str) -> WorkbookItem:
return WorkbookItem.from_response(server_response.content, self.parent_srv.namespace)[0]

@api(version="2.8")
def refresh(self, workbook_id: str) -> JobItem:
id_ = getattr(workbook_id, "id", workbook_id)
def refresh(self, workbook_item: Union[WorkbookItem, str]) -> JobItem:
id_ = getattr(workbook_item, "id", workbook_item)
url = "{0}/{1}/refresh".format(self.baseurl, id_)
empty_req = RequestFactory.Empty.empty_req()
server_response = self.post_request(url, empty_req)
Expand Down

0 comments on commit 400c966

Please sign in to comment.