From e678e8bd0571e9e95fa30e28098b75c7e61399a7 Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 2 Dec 2021 02:32:02 +0100 Subject: [PATCH] fix init checks --- InvenTree/common/notifications.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InvenTree/common/notifications.py b/InvenTree/common/notifications.py index aa58b2e5c8..ff476e17bc 100644 --- a/InvenTree/common/notifications.py +++ b/InvenTree/common/notifications.py @@ -20,7 +20,7 @@ class NotificationMethod: def __init__(self, obj, entry_name, receivers) -> None: # check if a sending fnc is defined - if ('send' not in self) and ('send_bulk' not in self): + if (not hasattr(self, 'send')) and (not hasattr(self, 'send_bulk')): raise NotImplementedError('A NotificationMethod must either define a `send` or a `send_bulk` method') # define arguments