From 456dc9aa2161ad88383061af541e5bd4ea2e1836 Mon Sep 17 00:00:00 2001 From: ariel-za <78344336+ariel-za@users.noreply.github.com> Date: Mon, 26 Feb 2024 10:53:32 +0200 Subject: [PATCH] Update zendesk_v2.py Signed-off-by: ariel-za <78344336+ariel-za@users.noreply.github.com> --- .../Connectors/zendesk_v2/zendesk_v2.py | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Open-Connectors/Connectors/zendesk_v2/zendesk_v2.py b/Open-Connectors/Connectors/zendesk_v2/zendesk_v2.py index d027eba..5071d70 100644 --- a/Open-Connectors/Connectors/zendesk_v2/zendesk_v2.py +++ b/Open-Connectors/Connectors/zendesk_v2/zendesk_v2.py @@ -204,28 +204,28 @@ def post_authomize_data(url, data): logging.error("Data causing the issue: %s", batch) # Add this line to log the problematic data # Post user_dicts and write to file for troubleshooting -with open('/app/zendesk_v2/accounts.json', 'w') as file: - file.write(json.dumps(account_data)) +# with open('/app/zendesk_v2/accounts.json', 'w') as file: +# file.write(json.dumps(account_data)) post_authomize_data(accounts_url, account_data) # Post role_dicts and write to file for troubleshooting -with open('/app/zendesk_v2/groups.json', 'w') as file: - file.write(json.dumps(groups_data)) +# with open('/app/zendesk_v2/groups.json', 'w') as file: +# file.write(json.dumps(groups_data)) post_authomize_data(grouping_url, groups_data) # Post use to role and write to file for troubleshooting -with open('/app/zendesk_v2/account_to_group.json', 'w') as file: - file.write(json.dumps(account_to_group_data)) +# with open('/app/zendesk_v2/account_to_group.json', 'w') as file: +# file.write(json.dumps(account_to_group_data)) post_authomize_data(accounts_to_groups_url, account_to_group_data) # Post privilege_dict and write to file for troubleshooting -with open('/app/zendesk_v2/privileges.json', 'w') as file: - file.write(json.dumps(privileges_data)) +# with open('/app/zendesk_v2/privileges.json', 'w') as file: +# file.write(json.dumps(privileges_data)) post_authomize_data(privileges_url, privileges_data) # Post role_association_dict and write to file for troubleshooting -with open('/app/zendesk_v2/permissions.json', 'w') as file: - file.write(json.dumps(permissions_data)) +# with open('/app/zendesk_v2/permissions.json', 'w') as file: +# file.write(json.dumps(permissions_data)) post_authomize_data(permission_url, permissions_data) # extract first Accepted_timestamps of a list of timestamp strings @@ -237,4 +237,4 @@ def post_authomize_data(url, data): # Send the DELETE request using the first user's timestamp delete_url = f'https://api.authomize.com/v2/apps/{appId}/data?modifiedBefore={timestamp}' delete_response = requests.delete(delete_url, headers=authomize_headers) -logging.info("Authomize Delete Response for: %s: %s", delete_url, delete_response.text) \ No newline at end of file +logging.info("Authomize Delete Response for: %s: %s", delete_url, delete_response.text)