mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
PEP fixes
This commit is contained in:
parent
f88882da8e
commit
75c7722612
@ -1,7 +1,6 @@
|
||||
import logging
|
||||
from datetime import timedelta
|
||||
|
||||
from django.conf import settings
|
||||
from django.template.loader import render_to_string
|
||||
|
||||
from allauth.account.models import EmailAddress
|
||||
@ -120,6 +119,7 @@ class EmailNotification(BulkNotificationMethod):
|
||||
|
||||
return True
|
||||
|
||||
|
||||
class UIMessageNotification(SingleNotificationMethod):
|
||||
METHOD_NAME = 'ui_message'
|
||||
|
||||
@ -128,12 +128,12 @@ class UIMessageNotification(SingleNotificationMethod):
|
||||
|
||||
def send(self, target):
|
||||
NotificationMessage.objects.create(
|
||||
target_object = self.obj,
|
||||
source_object = target,
|
||||
user = target,
|
||||
category = self.category,
|
||||
name = self.context['name'],
|
||||
message = self.context['message'],
|
||||
target_object=self.obj,
|
||||
source_object=target,
|
||||
user=target,
|
||||
category=self.category,
|
||||
name=self.context['name'],
|
||||
message=self.context['message'],
|
||||
)
|
||||
# endregion
|
||||
# endregion
|
||||
|
@ -43,10 +43,6 @@ class NotificationTests(BaseNotificationIntegrationTest):
|
||||
def get_targets(self):
|
||||
return []
|
||||
|
||||
def setup(self):
|
||||
print('running setup on WrongImplementation')
|
||||
return super().setup()
|
||||
|
||||
with self.assertRaises(NotImplementedError):
|
||||
self._notification_run()
|
||||
|
||||
@ -59,10 +55,6 @@ class NotificationTests(BaseNotificationIntegrationTest):
|
||||
def get_targets(self):
|
||||
return []
|
||||
|
||||
def setup(self):
|
||||
print('running setup on WrongImplementation')
|
||||
return super().setup()
|
||||
|
||||
with self.assertRaises(NotImplementedError):
|
||||
self._notification_run()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user