Skip to content
Snippets Groups Projects
Verified Commit 2b16e515 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Only save once in Notification.save

parent bdc40ff3
No related branches found
No related tags found
1 merge request!137Generalise notifications and implement SMS notifications
......@@ -221,8 +221,6 @@ class Notification(models.Model):
return self.title
def save(self, **kwargs):
super().save(**kwargs)
if not self.sent:
context = {
"notification": self,
......@@ -235,7 +233,8 @@ class Notification(models.Model):
context=context,
)
self.sent = True
super().save(**kwargs)
super().save(**kwargs)
class Meta:
verbose_name = _("Notification")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment