mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
fix init checks
This commit is contained in:
parent
7974559ead
commit
e678e8bd05
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user