]> git.ozlabs.org Git - patchwork/blobdiff - apps/patchwork/utils.py
Fix django-1.6 incompatibilities
[patchwork] / apps / patchwork / utils.py
index 9e1702e647673c6295fbe36524946895be83392d..7e3346ef1f986518772599be4086a8370bab2f8e 100644 (file)
@@ -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()