Skip to content

Commit

Permalink
Logic was backwards in the Permissions updates functions so it was sk…
Browse files Browse the repository at this point in the history
…ipping deletes when it shouldn't
  • Loading branch information
bryanthowell-tableau committed Mar 11, 2021
1 parent 2f13fb1 commit 5b724e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 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.2.0',
version='5.2.1',
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
10 changes: 5 additions & 5 deletions tableau_rest_api/published_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,17 +456,17 @@ def set_permissions_by_permissions_obj_list(self, new_permissions_obj_list):
# Check if there are any existing capabilities on the object
if cur_obj.luid == new_permissions_obj.luid:
# Find if anything is set already, add to deletion queue
need_to_change = self.are_capabilities_obj_dicts_identical(
are_identical = self.are_capabilities_obj_dicts_identical(
cur_obj.get_capabilities_dict(), new_permissions_obj.get_capabilities_dict()
)
self.log("Existing permissions found for luid {}. Are there differences? {}".format(cur_obj.luid,
str(need_to_change)))
self.log("Existing permissions found for luid {}. Are they the same? {}".format(cur_obj.luid,
str(are_identical)))
# Delete all existing permissions
if need_to_change is True:
if are_identical is False:
self.log("Removing existing permissions for luid {}".format(cur_obj.luid))
self.delete_permissions_by_permissions_obj_list([cur_obj, ])

if need_to_change is False:
if are_identical is True:
self.log('No changes necessary, skipping update for quicker performance')
# self.end_log_block()
continue
Expand Down

0 comments on commit 5b724e5

Please sign in to comment.