From 3a8909f0d4769529754e0e2999209061dd3728bd Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 4 Dec 2021 03:44:07 +0100 Subject: [PATCH] and a bit more renaming --- InvenTree/common/notifications.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/InvenTree/common/notifications.py b/InvenTree/common/notifications.py index 5012e908fe..3f1fe52c10 100644 --- a/InvenTree/common/notifications.py +++ b/InvenTree/common/notifications.py @@ -80,7 +80,7 @@ class NotificationMethod: def setup(self): return True - # def send(self, receiver) + # def send(self, targets) # def send_bulk(self) def cleanup(self): @@ -88,7 +88,7 @@ class NotificationMethod: class SingleNotificationMethod(NotificationMethod): - def send(self, receiver): + def send(self, target): raise NotImplementedError('The `send` method must be overriden!') @@ -126,11 +126,11 @@ class UIMessageNotification(SingleNotificationMethod): def get_recipients(self): return self.targets - def send(self, receiver): + def send(self, target): NotificationMessage.objects.create( target_object = self.obj, - source_object = receiver, - user = receiver, + source_object = target, + user = target, category = self.entry_name, name = self.context['name'], message = self.context['message'],