summaryrefslogtreecommitdiffstats
path: root/templates/patchwork
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2012-06-17 16:06:37 +0800
committerJeremy Kerr <jk@ozlabs.org>2012-06-17 16:10:12 +0800
commit7a79c1a2e4b2ceaf2668fa671f2db98c0de7b724 (patch)
treecebb809dc635b7276087553f2d18a135b47b31ff /templates/patchwork
parent016c66b8eb294314235c0df004c20c88bf5ead64 (diff)
downloadpatchwork-7a79c1a2e4b2ceaf2668fa671f2db98c0de7b724.tar.bz2
patchwork-7a79c1a2e4b2ceaf2668fa671f2db98c0de7b724.tar.xz
templates: Don't rely on bool(Page)
The behaviour of bool(Page) changed in django 1.4 - it no longer evaluates to False when page has no objects. When checking for an empty patch list, use page.paginator.count. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'templates/patchwork')
-rw-r--r--templates/patchwork/patch-list.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/patchwork/patch-list.html b/templates/patchwork/patch-list.html
index 770f005..723c4a0 100644
--- a/templates/patchwork/patch-list.html
+++ b/templates/patchwork/patch-list.html
@@ -134,7 +134,7 @@
</tr>
</thead>
-{% if page %}
+{% if page.paginator.count %}
<tbody>
{% for patch in page.object_list %}
<tr id="patch_row:{{patch.id}}" class="{% cycle 'odd' 'even' %}">