summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/orm/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/toaster/orm/models.py')
-rw-r--r--bitbake/lib/toaster/orm/models.py8
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
1171def invalidate_cache(**kwargs): 1175def invalidate_cache(**kwargs):
1172 from django.core.cache import cache 1176 from django.core.cache import cache
1173 try: 1177 try: