diff options
| author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2015-06-17 12:27:48 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-06-26 09:27:32 +0100 |
| commit | 335c975650580001b2176020c762c002bde198d6 (patch) | |
| tree | a9e2907b72bbbac2ad897b7839f8114e60935038 /bitbake/lib/toaster/orm/models.py | |
| parent | d7c8d9558c8b600be1507212c78dde833b2bb57e (diff) | |
| download | poky-335c975650580001b2176020c762c002bde198d6.tar.gz | |
bitbake: toaster: fixes after replacing BuildRequest with Build
This is a set of fixes that repair the interface after
we switched from displaying BuildRequest data to Build data
in the formerly "managed" mode.
(Bitbake rev: 57f790b0c56297af8c83d5def8461bd5d61fe4af)
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/models.py')
| -rw-r--r-- | bitbake/lib/toaster/orm/models.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py index d97eadb592..e93629b7ba 100644 --- a/bitbake/lib/toaster/orm/models.py +++ b/bitbake/lib/toaster/orm/models.py | |||
| @@ -283,8 +283,9 @@ class Build(models.Model): | |||
| 283 | 283 | ||
| 284 | 284 | ||
| 285 | def get_current_status(self): | 285 | def get_current_status(self): |
| 286 | if self.outcome == Build.IN_PROGRESS and self.build_name == "": | 286 | from bldcontrol.models import BuildRequest |
| 287 | return "Queued" | 287 | if self.outcome == Build.IN_PROGRESS and self.buildrequest.state != BuildRequest.REQ_INPROGRESS: |
| 288 | return self.buildrequest.get_state_display() | ||
| 288 | return self.get_outcome_display() | 289 | return self.get_outcome_display() |
| 289 | 290 | ||
| 290 | def __str__(self): | 291 | def __str__(self): |
| @@ -1168,6 +1169,9 @@ class LogMessage(models.Model): | |||
| 1168 | pathname = models.FilePathField(max_length=255, blank=True) | 1169 | pathname = models.FilePathField(max_length=255, blank=True) |
| 1169 | lineno = models.IntegerField(null=True) | 1170 | lineno = models.IntegerField(null=True) |
| 1170 | 1171 | ||
| 1172 | def __str__(self): | ||
| 1173 | return "%s %s %s" % (self.get_level_display(), self.message, self.build) | ||
| 1174 | |||
| 1171 | def invalidate_cache(**kwargs): | 1175 | def invalidate_cache(**kwargs): |
| 1172 | from django.core.cache import cache | 1176 | from django.core.cache import cache |
| 1173 | try: | 1177 | try: |
