diff options
| author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2014-02-13 13:36:54 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-03-09 12:23:57 -0700 |
| commit | 7008a24792704b8e757c583663636addf49f397d (patch) | |
| tree | 85af5fc40963aabf6f243242da761fe6ad94a14e /bitbake/lib/toaster/orm | |
| parent | 4ae598195b60ea5a4c0a3efaded679208e1cc07e (diff) | |
| download | poky-7008a24792704b8e757c583663636addf49f397d.tar.gz | |
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>
Diffstat (limited to 'bitbake/lib/toaster/orm')
| -rw-r--r-- | bitbake/lib/toaster/orm/models.py | 5 |
1 files changed, 5 insertions, 0 deletions
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): | |||
| 116 | def get_related_setscene(self): | 116 | def get_related_setscene(self): |
| 117 | return Task.objects.related_setscene(self) | 117 | return Task.objects.related_setscene(self) |
| 118 | 118 | ||
| 119 | def get_executed_display(self): | ||
| 120 | if self.task_executed: | ||
| 121 | return "Executed" | ||
| 122 | return "Not Executed" | ||
| 123 | |||
| 119 | build = models.ForeignKey(Build, related_name='task_build') | 124 | build = models.ForeignKey(Build, related_name='task_build') |
| 120 | order = models.IntegerField(null=True) | 125 | order = models.IntegerField(null=True) |
| 121 | task_executed = models.BooleanField(default=False) # True means Executed, False means Not/Executed | 126 | task_executed = models.BooleanField(default=False) # True means Executed, False means Not/Executed |
