]> git.ozlabs.org Git - patchwork/commitdiff
[views] Fix empty bundle showing entire project's patches
authorJeremy Kerr <jk@ozlabs.org>
Sat, 20 Sep 2008 05:31:32 +0000 (15:31 +1000)
committerJeremy Kerr <jk@ozlabs.org>
Sat, 20 Sep 2008 05:31:32 +0000 (15:31 +1000)
If a bundle is empty, we end up triggering the 'if not patches' check
in generic_list(), which repopulates the patch list with the current
project's patches.

So, check for None instead, and leave the patch list empty.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
apps/patchwork/views/__init__.py

index 16a84cc23ebe6a12fcefe86bff17d4592d8a7470..4aadce4ac1a8a7d5a311e06cfc0673799db42631 100644 (file)
@@ -71,7 +71,7 @@ def generic_list(request, project, view,
         else:
             context.filters.set_status(filterclass, setting)
 
-    if not patches:
+    if patches is None:
         patches = Patch.objects.filter(project=project)
 
     patches = context.filters.apply(patches)