Ubuntu Pastebin

Paste from pitti at Mon, 9 Jan 2017 09:53:00 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From d7268a24220335db4610f1cb55aeb3f8fa3dfe26 Mon Sep 17 00:00:00 2001
From: Martin Pitt <martin@piware.de>
Date: Mon, 9 Jan 2017 10:51:41 +0100
Subject: [PATCH] webcontrol statistics: Fix crash o missing numpkgs

We don't set numpkgs if there is only one result for a particular
architecture, so test for that instead of numpkgspass (which we always
set).
---
 webcontrol/templates/browse-statistics.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/webcontrol/templates/browse-statistics.html b/webcontrol/templates/browse-statistics.html
index 337e0c9..43c04e2 100644
--- a/webcontrol/templates/browse-statistics.html
+++ b/webcontrol/templates/browse-statistics.html
@@ -28,7 +28,7 @@
     <tr>
       <th>pass rate</th>
       {% for arch in release_arches[r]|sort %}
-      <td>{% if data[r][arch]['numpkgspass'] %}
+      <td>{% if data[r][arch]['numpkgs'] %}
              {{'%.1f' % (data[r][arch]['numpkgspass'] * 100 / data[r][arch]['numpkgs'])}}%
           {% endif %}</td>
       {% endfor %}
-- 
2.9.3
Download as text