From 65e7c9a7295e2dc337cf7ea84e0f7815f698dfb9 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Pasquier Date: Tue, 21 May 2019 14:52:02 +0200 Subject: [PATCH] perf: depth 0 --- djangoldp_notification/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/djangoldp_notification/models.py b/djangoldp_notification/models.py index 8cd4118..7f8b4ca 100644 --- a/djangoldp_notification/models.py +++ b/djangoldp_notification/models.py @@ -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: