summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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: