diff --git a/notifications_routing/authorization_service.py b/notifications_routing/authorization_service.py index 84dfc4be0992af9b39b273eb3c788981bcab7c65..e898e310440abd86203362dc84db09fddad0f674 100644 --- a/notifications_routing/authorization_service.py +++ b/notifications_routing/authorization_service.py @@ -41,6 +41,9 @@ def get_group_users_api(group_id: str): headers = {"Authorization": "Bearer {}".format(token)} response = _get_group_users(group_id, headers) + if "data" not in response: + return [] + data = response["data"] while response.get("pagination").get("next"):