From dade1d89321650088e946d80600a5de8d8d33996 Mon Sep 17 00:00:00 2001 From: Bryant Howell Date: Mon, 17 Feb 2020 11:46:07 -0600 Subject: [PATCH] Fix for query_workbooks_json --- setup.py | 2 +- tableau_rest_api/methods/workbook.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index e7ed9cf..4ba1feb 100644 --- a/setup.py +++ b/setup.py @@ -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', diff --git a/tableau_rest_api/methods/workbook.py b/tableau_rest_api/methods/workbook.py index db80e3e..5be9c9e 100644 --- a/tableau_rest_api/methods/workbook.py +++ b/tableau_rest_api/methods/workbook.py @@ -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()