From dff684304a35c14e23d89783d18e1664222b3fcb Mon Sep 17 00:00:00 2001 From: Jeremy Kerr Date: Sat, 20 Sep 2008 15:31:32 +1000 Subject: [PATCH] [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 --- apps/patchwork/views/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.39.2