From 7467b6802d64e12710510d8e4653da15d12d7089 Mon Sep 17 00:00:00 2001 From: Elliot Smith Date: Wed, 14 Oct 2015 13:29:17 -0700 Subject: bitbake: toaster: Exclude "command line builds" project from projects typeahead The "New build" drop-down provides autocomplete for Toaster projects. However, it should not include the default project (for command line builds), as it should not be possible for the user to select this project as the container for a Toaster build. [YOCTO #8231] (Bitbake rev: d6210cd75b0cd8b6d24d5e99f607ba5cc45daf97) Signed-off-by: Elliot Smith Signed-off-by: Ed Bartosh Signed-off-by: brian avery Signed-off-by: Richard Purdie --- bitbake/lib/toaster/toastergui/typeaheads.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bitbake') diff --git a/bitbake/lib/toaster/toastergui/typeaheads.py b/bitbake/lib/toaster/toastergui/typeaheads.py index 9db31827ba..dd4b7f5057 100644 --- a/bitbake/lib/toaster/toastergui/typeaheads.py +++ b/bitbake/lib/toaster/toastergui/typeaheads.py @@ -121,12 +121,12 @@ class RecipesTypeAhead(ToasterTypeAhead): return results class ProjectsTypeAhead(ToasterTypeAhead): - """ Typeahead for all the projects """ + """ Typeahead for all the projects, except for command line builds """ def __init__(self): super(ProjectsTypeAhead, self).__init__() def apply_search(self, search_term, prj, request): - projects = Project.objects.all().order_by("name") + projects = Project.objects.exclude(is_default=True).order_by("name") primary_results = projects.filter(name__istartswith=search_term) secondary_results = projects.filter(name__icontains=search_term).exclude(pk__in=primary_results) -- cgit v1.2.3-54-g00ecf