Merge branch 'jbpasquier/depth' into 'master'

perf: depth 0

See merge request startinblox/djangoldp-packages/djangoldp-notifications!12
This commit is contained in:
Jean-Baptiste Pasquier 2019-05-21 15:22:40 +00:00
commit c8bb171ea4

View File

@ -30,6 +30,7 @@ class Notification(Model):
class Meta(Model.Meta):
#permission_classes = [InboxPermissions]
depth = 0
ordering = ['date']
def __str__(self):
@ -88,7 +89,7 @@ def send_email_on_notification(sender, instance, **kwargs):
instance.summary,
settings.EMAIL_HOST_USER or "noreply@" + settings.JABBER_DEFAULT_HOST,
[instance.user.email],
fail_silently=False,
fail_silently=True,
html_message=html_message
)
else: