summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2008-09-20 15:31:32 +1000
committerJeremy Kerr <jk@ozlabs.org>2008-09-20 15:31:32 +1000
commitdff684304a35c14e23d89783d18e1664222b3fcb (patch)
treef9bf739725ab6d9d8f2a30ff61d138cbcedc3e89
parentf26f929de02369cf73fc8ab54fff3a046855dd9f (diff)
downloadpatchwork-dff684304a35c14e23d89783d18e1664222b3fcb.tar.bz2
patchwork-dff684304a35c14e23d89783d18e1664222b3fcb.tar.xz
[views] Fix empty bundle showing entire project's patches
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>
-rw-r--r--apps/patchwork/views/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/patchwork/views/__init__.py b/apps/patchwork/views/__init__.py
index 16a84cc..4aadce4 100644
--- a/apps/patchwork/views/__init__.py
+++ b/apps/patchwork/views/__init__.py
@@ -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)