From b1d5990ab379a07cc08b08a3405cea36f7880958 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Fri, 14 Jul 2017 16:52:52 +0300 Subject: [PATCH] Make sure event_names returns *all* events --- notifications/notificationevent.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/notifications/notificationevent.py b/notifications/notificationevent.py index 87a736878..ecc6a40a5 100644 --- a/notifications/notificationevent.py +++ b/notifications/notificationevent.py @@ -70,7 +70,10 @@ class NotificationEvent(object): @classmethod def event_names(cls): for subc in cls.__subclasses__(): - if subc.event_name() is not None: + if subc.event_name() is None: + for subsubc in subc.__subclasses__(): + yield subsubc.event_name() + else: yield subc.event_name() @staticmethod