From 5aefda0ce7574ab4286b3b830c643443a3093133 Mon Sep 17 00:00:00 2001
From: Emmanuel Ormancey <emmanuel.ormancey@cern.ch>
Date: Mon, 19 Dec 2022 20:13:42 +0100
Subject: [PATCH] [#81] Ignore 404 error on get_group_users for deleted grappa
 groups

---
 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..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:
+    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