X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=apps%2Fpatchwork%2Futils.py;h=7e3346ef1f986518772599be4086a8370bab2f8e;hb=628a57c214b63b81e457a4a369cc370f4254358f;hp=9e1702e647673c6295fbe36524946895be83392d;hpb=b8c32a2f022890d0ada32b5750b9427607c4c7e1;p=patchwork 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()