mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
add receiver to single send metod
This commit is contained in:
parent
25a76d37e7
commit
916ef0d6c4
@ -39,7 +39,7 @@ class NotificationMethod:
|
|||||||
|
|
||||||
|
|
||||||
class SingleNotificationMethod(NotificationMethod):
|
class SingleNotificationMethod(NotificationMethod):
|
||||||
def send(self, context):
|
def send(self, receiver, context):
|
||||||
raise NotImplementedError('The `send` method must be overriden!')
|
raise NotImplementedError('The `send` method must be overriden!')
|
||||||
|
|
||||||
|
|
||||||
@ -139,7 +139,7 @@ def deliver_notification(cls: NotificationMethod, obj, entry_name: str, receiver
|
|||||||
|
|
||||||
elif 'send' in method:
|
elif 'send' in method:
|
||||||
for rec in method.recipiends:
|
for rec in method.recipiends:
|
||||||
method.send(notification_context)
|
method.send(rec, notification_context)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
raise NotImplementedError('No delivery method found')
|
raise NotImplementedError('No delivery method found')
|
||||||
|
Loading…
Reference in New Issue
Block a user