diff options
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/toaster/orm/models.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py index 630e4a0003..e9182c56e7 100644 --- a/bitbake/lib/toaster/orm/models.py +++ b/bitbake/lib/toaster/orm/models.py | |||
@@ -508,7 +508,7 @@ class Build(models.Model): | |||
508 | tf = Task.objects.filter(build = self) | 508 | tf = Task.objects.filter(build = self) |
509 | tfc = tf.count() | 509 | tfc = tf.count() |
510 | if tfc > 0: | 510 | if tfc > 0: |
511 | completeper = tf.exclude(order__isnull=True).count()*100 // tfc | 511 | completeper = tf.exclude(outcome=Task.OUTCOME_NA).count()*100 // tfc |
512 | else: | 512 | else: |
513 | completeper = 0 | 513 | completeper = 0 |
514 | return completeper | 514 | return completeper |
@@ -709,10 +709,11 @@ class Build(models.Model): | |||
709 | tasks. | 709 | tasks. |
710 | 710 | ||
711 | Note that the mechanism for testing whether a Task is "done" is whether | 711 | Note that the mechanism for testing whether a Task is "done" is whether |
712 | its order field is set, as per the completeper() method. | 712 | its outcome field is set, as per the completeper() method. |
713 | """ | 713 | """ |
714 | return self.outcome == Build.IN_PROGRESS and \ | 714 | return self.outcome == Build.IN_PROGRESS and \ |
715 | self.task_build.filter(order__isnull=False).count() == 0 | 715 | self.task_build.exclude(outcome=Task.OUTCOME_NA).count() == 0 |
716 | |||
716 | 717 | ||
717 | def get_state(self): | 718 | def get_state(self): |
718 | """ | 719 | """ |