From ce2bc828eeb80567b19a8b1d48cf7bdb9637bb11 Mon Sep 17 00:00:00 2001
From: ormancey <emmanuel.ormancey@cern.ch>
Date: Thu, 4 Nov 2021 15:55:50 +0100
Subject: [PATCH] fixed empty category check

---
 notifications_routing/router.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/notifications_routing/router.py b/notifications_routing/router.py
index 49a1e52..c8a69f2 100644
--- a/notifications_routing/router.py
+++ b/notifications_routing/router.py
@@ -69,7 +69,7 @@ class Router(megabus.Listener):
 
         category_name = (
             channel[str(InputMessageKeys.CATEGORY)][str(InputMessageKeys.NAME)]
-            if str(InputMessageKeys.CATEGORY) in channel
+            if channel.get(str(InputMessageKeys.CATEGORY)) in channel
             else None
         )
 
-- 
GitLab