fix init checks

This commit is contained in:
Matthias 2021-12-02 02:32:02 +01:00
parent 7974559ead
commit e678e8bd05
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -20,7 +20,7 @@ class NotificationMethod:
def __init__(self, obj, entry_name, receivers) -> None: def __init__(self, obj, entry_name, receivers) -> None:
# check if a sending fnc is defined # 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') raise NotImplementedError('A NotificationMethod must either define a `send` or a `send_bulk` method')
# define arguments # define arguments