summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2016-04-06 17:46:39 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-04-06 23:10:29 +0100
commitf4cee8840e51658a0002bf339ff49b7409dc8544 (patch)
tree59acd99e9f8d1f85544ab48b1abbf6afe7040b84 /bitbake
parent296d3733df0b4da8ac8e793a552da2ecdfa32f20 (diff)
downloadpoky-f4cee8840e51658a0002bf339ff49b7409dc8544.tar.gz
bitbake: toaster: models Exclude the CANCELLED builds from get_number_of_builds
Don't count CANCELLED builds when returning the number of builds. (Bitbake rev: c3c29fd4eb5116b771e8e16281d4e3cdf4fae165) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/toaster/orm/models.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py
index 7598744a24..2a01184a73 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -197,7 +197,10 @@ class Project(models.Model):
197 def get_number_of_builds(self): 197 def get_number_of_builds(self):
198 """Return the number of builds which have ended""" 198 """Return the number of builds which have ended"""
199 199
200 return self.build_set.filter(~Q(outcome=Build.IN_PROGRESS)).count() 200 return self.build_set.exclude(
201 Q(outcome=Build.IN_PROGRESS) |
202 Q(outcome=Build.CANCELLED)
203 ).count()
201 204
202 def get_last_build_id(self): 205 def get_last_build_id(self):
203 try: 206 try: