Skip to content

Commit 40cd444

Browse files
jorwoodsJordan Woods
authored andcommitted
Unpack list of views in class method response
1 parent 4f9ca59 commit 40cd444

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tableauserverclient/models/favorites_item.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ def get_favorites(server_response, namespace):
2828
if fav_workbook:
2929
favorites['workbooks'].append(fav_workbook)
3030
for view in parsed_response.findall('.//t:favorite[t:view]', namespace):
31-
fav_view = ViewItem()
32-
fav_view.from_xml_element(view, namespace)
33-
if fav_view:
34-
favorites['views'].append(fav_view)
31+
fav_views = ViewItem.from_xml_element(view, namespace)
32+
if fav_views:
33+
for fav_view in fav_views:
34+
favorites['views'].append(fav_view)
3535
for datasource in parsed_response.findall('.//t:favorite/t:datasource', namespace):
3636
fav_datasource = DatasourceItem('')
3737
fav_datasource._set_values(*fav_datasource._parse_element(datasource, namespace))

0 commit comments

Comments
 (0)