From 8ef5165b5accaffa59a51a2316ed3304680da224 Mon Sep 17 00:00:00 2001 From: Alexandru DAMIAN Date: Tue, 23 Jun 2015 10:44:42 +0100 Subject: bitbake: toaster: delete multiple builds This patch fixes the build deletion on unmigrated databases, and enhances it to delete multiple builds in a single run. [YOCTO #7726] (Bitbake rev: d5468d84c1ef83c780de5974c8e3a11eab762489) Signed-off-by: Alexandru DAMIAN Signed-off-by: Richard Purdie --- bitbake/lib/toaster/toastergui/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bitbake/lib/toaster/toastergui') diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py index 1a504b8455..ec65903080 100755 --- a/bitbake/lib/toaster/toastergui/views.py +++ b/bitbake/lib/toaster/toastergui/views.py @@ -64,9 +64,9 @@ def _get_latest_builds(prj=None): if prj is not None: queryset = queryset.filter(project = prj) - return itertools.chain( + return list(itertools.chain( queryset.filter(outcome=Build.IN_PROGRESS).order_by("-pk"), - queryset.filter(outcome__lt=Build.IN_PROGRESS).order_by("-pk")[:3] ) + queryset.filter(outcome__lt=Build.IN_PROGRESS).order_by("-pk")[:3] )) # a JSON-able dict of recent builds; for use in the Project page, xhr_ updates, and other places, as needed -- cgit v1.2.3-54-g00ecf