8000 Fix update_workbook endpoint to address #454 (#461) · tableau/server-client-python@bdddf97 · GitHub
[go: up one dir, main page]

Skip to content

Commit bdddf97

Browse files
author
Chris Shin
authored
Fix update_workbook endpoint to address #454 (#461)
1 parent d87600b commit bdddf97

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tableauserverclient/server/request_factory.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,15 +382,16 @@ def update_req(self, workbook_item):
382382
workbook_element = ET.SubElement(xml_request, 'workbook')
383383
if workbook_item.name:
384384
workbook_element.attrib['name'] = workbook_item.name
385-
if workbook_item.show_tabs:
385+
if workbook_item.show_tabs is not None:
386386
workbook_element.attrib['showTabs'] = str(workbook_item.show_tabs).lower()
387387
if workbook_item.project_id:
388388
project_element = ET.SubElement(workbook_element, 'project')
389389
project_element.attrib['id'] = workbook_item.project_id
390390
if workbook_item.owner_id:
391391
owner_element = ET.SubElement(workbook_element, 'owner')
392392
owner_element.attrib['id'] = workbook_item.owner_id
393-
if workbook_item.materialized_views_config is not None:
393+
if workbook_item.materialized_views_config['materialized_views_enabled']\
394+
and workbook_item.materialized_views_config['run_materialization_now']:
394395
materialized_views_config = workbook_item.materialized_views_config
395396
materialized_views_element = ET.SubElement(workbook_element, 'materializedViewsEnablementConfig')
396397
materialized_views_element.attrib['materializedViewsEnabled'] = str(materialized_views_config

0 commit comments

Comments
 (0)
0