add receiver to single send metod

This commit is contained in:
Matthias 2021-12-02 01:26:30 +01:00
parent 25a76d37e7
commit 916ef0d6c4
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -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')