1
0
mirror of https://git.yoctoproject.org/poky synced 2026-07-26 19:17:07 +00:00

bitbake: toastergui: fix task executed status display

The proper way to get a display-able value
in Django is to use a model method instead of clutter
the template with if/else.

	[YOCTO #5641]

(Bitbake rev: bb21b71dab70db163b804c7ebf27b85c59a39112)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Alexandru DAMIAN
2014-02-13 13:36:54 +00:00
committed by Richard Purdie
parent 4ae598195b
commit 7008a24792
3 changed files with 7 additions and 12 deletions
+5
View File
@@ -116,6 +116,11 @@ class Task(models.Model):
def get_related_setscene(self):
return Task.objects.related_setscene(self)
def get_executed_display(self):
if self.task_executed:
return "Executed"
return "Not Executed"
build = models.ForeignKey(Build, related_name='task_build')
order = models.IntegerField(null=True)
task_executed = models.BooleanField(default=False) # True means Executed, False means Not/Executed