diff options
author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2015-03-13 17:13:25 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-03-21 00:00:24 +0000 |
commit | 5d021f6de6973e5573dc4c2425b1faf33b5e9f98 (patch) | |
tree | 39349752068c7cbbab2c03d1599e0452189adbf8 /bitbake | |
parent | ede212b2dd3a77680e82571a651150ae773b97ff (diff) | |
download | poky-5d021f6de6973e5573dc4c2425b1faf33b5e9f98.tar.gz |
bitbake: toastergui: fix machines page search
This patch fixes the machine page search.
[YOCTO #7407]
(Bitbake rev: 51c6e3edf074da6ebd8b347f13dc0f88b25c0111)
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rwxr-xr-x | bitbake/lib/toaster/toastergui/views.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py index 439c068515..fa34e5622f 100755 --- a/bitbake/lib/toaster/toastergui/views.py +++ b/bitbake/lib/toaster/toastergui/views.py | |||
@@ -2867,15 +2867,17 @@ if toastermain.settings.MANAGED: | |||
2867 | # for that object type. copypasta for all needed table searches | 2867 | # for that object type. copypasta for all needed table searches |
2868 | (filter_string, search_term, ordering_string) = _search_tuple(request, Machine) | 2868 | (filter_string, search_term, ordering_string) = _search_tuple(request, Machine) |
2869 | 2869 | ||
2870 | queryset_all = Machine.objects.all() | ||
2871 | queryset_all = queryset_all.prefetch_related('layer_version') | ||
2872 | |||
2873 | prj = Project.objects.get(pk = request.session['project_id']) | 2870 | prj = Project.objects.get(pk = request.session['project_id']) |
2874 | compatible_layers = prj.compatible_layerversions() | 2871 | compatible_layers = prj.compatible_layerversions() |
2875 | 2872 | ||
2873 | queryset_all = Machine.objects.filter(layer_version__in=compatible_layers) | ||
2874 | queryset_all = _get_queryset(Machine, queryset_all, None, search_term, ordering_string, 'name') | ||
2875 | |||
2876 | queryset_all = queryset_all.prefetch_related('layer_version') | ||
2877 | |||
2878 | |||
2876 | # Make sure we only show machines / layers which are compatible | 2879 | # Make sure we only show machines / layers which are compatible |
2877 | # with the current project | 2880 | # with the current project |
2878 | queryset_all = queryset_all.filter(layer_version__in=compatible_layers) | ||
2879 | 2881 | ||
2880 | project_layers = ProjectLayer.objects.filter(project_id=request.session['project_id']).values_list('layercommit',flat=True) | 2882 | project_layers = ProjectLayer.objects.filter(project_id=request.session['project_id']).values_list('layercommit',flat=True) |
2881 | 2883 | ||