From 7008a24792704b8e757c583663636addf49f397d Mon Sep 17 00:00:00 2001 From: Alexandru DAMIAN Date: Thu, 13 Feb 2014 13:36:54 +0000 Subject: 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 Signed-off-by: Richard Purdie --- bitbake/lib/toaster/orm/models.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bitbake/lib/toaster/orm') diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py index c77df2243e..f96da9c339 100644 --- a/bitbake/lib/toaster/orm/models.py +++ b/bitbake/lib/toaster/orm/models.py @@ -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 -- cgit v1.2.3-54-g00ecf