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

Skip to content

Commit 2f7e361

Browse files
author
Chris Shin
committed
Fix update_workbook endpoint to address tableau#454 (tableau#461)
(cherry picked from commit bdddf97)
1 parent f6d4d35 commit 2f7e361

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
@@ -374,15 +374,16 @@ def update_req(self, workbook_item):
374374
workbook_element = ET.SubElement(xml_request, 'workbook')
375375
if workbook_item.name:
376376
workbook_element.attrib['name'] = workbook_item.name
377-
if workbook_item.show_tabs:
377+
if workbook_item.show_tabs is not None:
378378
workbook_element.attrib['showTabs'] = str(workbook_item.show_tabs).lower()
379379
if workbook_item.project_id:
380380
project_element = ET.SubElement(workbook_element, 'project')
381381
project_element.attrib['id'] = workbook_item.project_id
382382
if workbook_item.owner_id:
383383
owner_element = ET.SubElement(workbook_element, 'owner')
384384
owner_element.attrib['id'] = workbook_item.owner_id
385-
if workbook_item.materialized_views_config is not None:
385+
if workbook_item.materialized_views_config['materialized_views_enabled']\
386+
and workbook_item.materialized_views_config['run_materialization_now']:
386387
materialized_views_config = workbook_item.materialized_views_config
387388
materialized_views_element = ET.SubElement(workbook_element, 'materializedViewsEnablementConfig')
388389
materialized_views_element.attrib['materializedViewsEnabled'] = str(materialized_views_config

0 commit comments

Comments
 (0)
0