mirror of
https://git.yoctoproject.org/poky
synced 2026-04-19 15:32:13 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
296d3733df
commit
f4cee8840e
@@ -197,7 +197,10 @@ class Project(models.Model):
|
||||
def get_number_of_builds(self):
|
||||
"""Return the number of builds which have ended"""
|
||||
|
||||
return self.build_set.filter(~Q(outcome=Build.IN_PROGRESS)).count()
|
||||
return self.build_set.exclude(
|
||||
Q(outcome=Build.IN_PROGRESS) |
|
||||
Q(outcome=Build.CANCELLED)
|
||||
).count()
|
||||
|
||||
def get_last_build_id(self):
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user