Skip to content

Commit

Permalink
Fix for query_workbooks_json
Browse files Browse the repository at this point in the history
  • Loading branch information
Bryant Howell committed Feb 17, 2020
1 parent c5a4332 commit dade1d8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
setup(
name='tableau_tools',
python_requires='>=3.6',
version='5.1.1',
version='5.1.2',
packages=['tableau_tools', 'tableau_tools.tableau_rest_api', 'tableau_tools.tableau_documents',
'tableau_tools.examples', 'tableau_tools.tableau_rest_api.methods'],
url='https://github.com/bryantbhowell/tableau_tools',
Expand Down
5 changes: 2 additions & 3 deletions tableau_rest_api/methods/workbook.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,16 @@ def query_workbooks_json(self, username_or_luid: Optional[str] = None, all_field
if all_fields is True:
fields = ['_all_']

user_luid = self.query_user_luid(username_or_luid)

filter_checks = {'updatedAt': updated_at_filter, 'createdAt': created_at_filter, 'tags': tags_filter,
'ownerName': owner_name_filter}
filters = self._check_filter_objects(filter_checks)

if username_or_luid is not None:
user_luid = self.query_user_luid(username_or_luid)
wbs = self.query_resource_json("users/{}/workbooks".format(user_luid), sorts=sorts, filters=filters,
fields=fields, page_number=page_number)
else:
wbs = self.query_resource_json("workbooks".format(user_luid), sorts=sorts, filters=filters, fields=fields,
wbs = self.query_resource_json("workbooks", sorts=sorts, filters=filters, fields=fields,
page_number=page_number)

self.end_log_block()
Expand Down

0 comments on commit dade1d8

Please sign in to comment.