summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/patchwork/models.py2
-rw-r--r--apps/patchwork/utils.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/apps/patchwork/models.py b/apps/patchwork/models.py
index 9de2a22..a5f60cb 100644
--- a/apps/patchwork/models.py
+++ b/apps/patchwork/models.py
@@ -55,7 +55,7 @@ class Project(models.Model):
web_url = models.CharField(max_length=2000, blank=True)
scm_url = models.CharField(max_length=2000, blank=True)
webscm_url = models.CharField(max_length=2000, blank=True)
- send_notifications = models.BooleanField()
+ send_notifications = models.BooleanField(default=False)
def __unicode__(self):
return self.name
diff --git a/apps/patchwork/utils.py b/apps/patchwork/utils.py
index 9e1702e..7e3346e 100644
--- a/apps/patchwork/utils.py
+++ b/apps/patchwork/utils.py
@@ -191,8 +191,8 @@ def send_notifications():
projects = set([ n.patch.project.linkname for n in notifications ])
def delete_notifications():
- PatchChangeNotification.objects.filter(
- pk__in = notifications).delete()
+ pks = [ n.pk for n in notifications ]
+ PatchChangeNotification.objects.filter(pk__in = pks).delete()
if EmailOptout.is_optout(recipient.email):
delete_notifications()