summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliot Smith <elliot.smith@intel.com>2015-10-14 13:29:17 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-10-16 14:16:04 +0100
commitd6210cd75b0cd8b6d24d5e99f607ba5cc45daf97 (patch)
tree7c87da63e9b82e2b03b03d8f09ce18d29c82e437
parentce27b3fd728f0373aa1adc0d47baace264529b45 (diff)
downloadbitbake-d6210cd75b0cd8b6d24d5e99f607ba5cc45daf97.tar.gz
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] Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/toaster/toastergui/typeaheads.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/toaster/toastergui/typeaheads.py b/lib/toaster/toastergui/typeaheads.py
index 9db31827b..dd4b7f505 100644
--- a/lib/toaster/toastergui/typeaheads.py
+++ b/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)