[bitbake-devel] [PATCH 27/38] toaster: tables BuildsTable exclude cancelled builds

Michael Wood michael.g.wood at intel.com
Wed Apr 6 16:46:37 UTC 2016


From: Sujith H <sujith.h at gmail.com>

Exclude cancelled builds from showing in the builds table

[YOCTO #6787]

Signed-off-by: Sujith H <sujith.h at gmail.com>
Signed-off-by: Michael Wood <michael.g.wood at intel.com>
---
 lib/toaster/toastergui/tables.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/toaster/toastergui/tables.py b/lib/toaster/toastergui/tables.py
index 3340e05..2cc2f4e 100644
--- a/lib/toaster/toastergui/tables.py
+++ b/lib/toaster/toastergui/tables.py
@@ -1086,8 +1086,9 @@ class BuildsTable(ToasterTable):
         """
         queryset = self.get_builds()
 
-        # don't include in progress builds
-        queryset = queryset.exclude(outcome=Build.IN_PROGRESS)
+        # Don't include in progress builds pr cancelled builds
+        queryset = queryset.exclude(Q(outcome=Build.IN_PROGRESS) |
+                                    Q(outcome=Build.CANCELLED))
 
         # sort
         queryset = queryset.order_by(self.default_orderby)
-- 
2.1.4




More information about the bitbake-devel mailing list