From 8b19d251e63d0cb75522f96153fa0dd0bbfdf1c9 Mon Sep 17 00:00:00 2001 From: ormancey <emmanuel.ormancey@cern.ch> Date: Wed, 14 Dec 2022 13:42:34 +0100 Subject: [PATCH 1/2] fixed 404 error --- notifications_routing/authorization_service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notifications_routing/authorization_service.py b/notifications_routing/authorization_service.py index 465c4a6..b61043f 100644 --- a/notifications_routing/authorization_service.py +++ b/notifications_routing/authorization_service.py @@ -29,7 +29,7 @@ def _get_group_users(group_id: str, headers: Dict[str, str], url: str = None): url = f"{Config.CERN_AUTH_SERVICE_URL}{url}" r = requests.get(url, headers=headers) - if r.status_code != requests.codes.ok: + if r.status_code != requests.codes.ok & r.status_code != requests.codes.not_found: raise BadResponseCodeError(url, status_code=r.status_code) return json.loads(r.content) -- GitLab From ed55821ecb5b8acd1d107ed513b79cfc414d679d Mon Sep 17 00:00:00 2001 From: Carina Antunes <carina.oliveira.antunes@cern.ch> Date: Mon, 19 Dec 2022 20:08:48 +0100 Subject: [PATCH 2/2] Apply 1 suggestion(s) to 1 file(s) --- notifications_routing/authorization_service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notifications_routing/authorization_service.py b/notifications_routing/authorization_service.py index b61043f..84dfc4b 100644 --- a/notifications_routing/authorization_service.py +++ b/notifications_routing/authorization_service.py @@ -29,7 +29,7 @@ def _get_group_users(group_id: str, headers: Dict[str, str], url: str = None): url = f"{Config.CERN_AUTH_SERVICE_URL}{url}" r = requests.get(url, headers=headers) - if r.status_code != requests.codes.ok & r.status_code != requests.codes.not_found: + if r.status_code != requests.codes.ok and r.status_code != requests.codes.not_found: raise BadResponseCodeError(url, status_code=r.status_code) return json.loads(r.content) -- GitLab