diff options
author | Elliot Smith <elliot.smith@intel.com> | 2015-10-14 13:29:17 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-10-16 14:16:17 +0100 |
commit | 7467b6802d64e12710510d8e4653da15d12d7089 (patch) | |
tree | 052834fdbd4a55c490434a8c18fd5c85f005fe6d | |
parent | b5624c77ed91d20f1ab4737a921baa908cf00646 (diff) | |
download | poky-7467b6802d64e12710510d8e4653da15d12d7089.tar.gz |
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 <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-- | bitbake/lib/toaster/toastergui/typeaheads.py | 4 |
1 files changed, 2 insertions, 2 deletions
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): | |||
121 | return results | 121 | return results |
122 | 122 | ||
123 | class ProjectsTypeAhead(ToasterTypeAhead): | 123 | class ProjectsTypeAhead(ToasterTypeAhead): |
124 | """ Typeahead for all the projects """ | 124 | """ Typeahead for all the projects, except for command line builds """ |
125 | def __init__(self): | 125 | def __init__(self): |
126 | super(ProjectsTypeAhead, self).__init__() | 126 | super(ProjectsTypeAhead, self).__init__() |
127 | 127 | ||
128 | def apply_search(self, search_term, prj, request): | 128 | def apply_search(self, search_term, prj, request): |
129 | projects = Project.objects.all().order_by("name") | 129 | projects = Project.objects.exclude(is_default=True).order_by("name") |
130 | 130 | ||
131 | primary_results = projects.filter(name__istartswith=search_term) | 131 | primary_results = projects.filter(name__istartswith=search_term) |
132 | secondary_results = projects.filter(name__icontains=search_term).exclude(pk__in=primary_results) | 132 | secondary_results = projects.filter(name__icontains=search_term).exclude(pk__in=primary_results) |