From 3f9d392be990ab451948381f618ecb74bac8bcb5 Mon Sep 17 00:00:00 2001 From: Joey Orlando Date: Tue, 5 Sep 2023 14:32:28 +0200 Subject: [PATCH] address another slack-sdk issue --- engine/apps/slack/client.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/engine/apps/slack/client.py b/engine/apps/slack/client.py index e3f59d26..8837f13c 100644 --- a/engine/apps/slack/client.py +++ b/engine/apps/slack/client.py @@ -38,7 +38,7 @@ class SlackClientWithErrorHandling(WebClient): api_method = getattr(self, method) response = api_method(**kwargs) - cumulative_response = response + cumulative_response = response.data while ( "response_metadata" in response @@ -46,7 +46,7 @@ class SlackClientWithErrorHandling(WebClient): and response["response_metadata"]["next_cursor"] != "" ): kwargs["cursor"] = response["response_metadata"]["next_cursor"] - response = api_method(**kwargs) + response = api_method(**kwargs).data cumulative_response[paginated_key] += response[paginated_key] return cumulative_response @@ -69,7 +69,7 @@ class SlackClientWithErrorHandling(WebClient): rate_limited = False try: - response = api_method(**kwargs) + response = api_method(**kwargs).data cumulative_response = response cursor = response["response_metadata"]["next_cursor"] @@ -80,7 +80,7 @@ class SlackClientWithErrorHandling(WebClient): ): next_cursor = response["response_metadata"]["next_cursor"] kwargs["cursor"] = next_cursor - response = api_method(**kwargs) + response = api_method(**kwargs).data cumulative_response[paginated_key] += response[paginated_key] cursor = next_cursor