summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2015-03-13 17:13:25 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-03-21 00:00:24 +0000
commit5d021f6de6973e5573dc4c2425b1faf33b5e9f98 (patch)
tree39349752068c7cbbab2c03d1599e0452189adbf8
parentede212b2dd3a77680e82571a651150ae773b97ff (diff)
downloadast2050-yocto-poky-5d021f6de6973e5573dc4c2425b1faf33b5e9f98.zip
ast2050-yocto-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>
-rwxr-xr-xbitbake/lib/toaster/toastergui/views.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py
index 439c068..fa34e56 100755
--- a/bitbake/lib/toaster/toastergui/views.py
+++ b/bitbake/lib/toaster/toastergui/views.py
@@ -2867,15 +2867,17 @@ if toastermain.settings.MANAGED:
# for that object type. copypasta for all needed table searches
(filter_string, search_term, ordering_string) = _search_tuple(request, Machine)
- queryset_all = Machine.objects.all()
- queryset_all = queryset_all.prefetch_related('layer_version')
-
prj = Project.objects.get(pk = request.session['project_id'])
compatible_layers = prj.compatible_layerversions()
+ queryset_all = Machine.objects.filter(layer_version__in=compatible_layers)
+ queryset_all = _get_queryset(Machine, queryset_all, None, search_term, ordering_string, 'name')
+
+ queryset_all = queryset_all.prefetch_related('layer_version')
+
+
# Make sure we only show machines / layers which are compatible
# with the current project
- queryset_all = queryset_all.filter(layer_version__in=compatible_layers)
project_layers = ProjectLayer.objects.filter(project_id=request.session['project_id']).values_list('layercommit',flat=True)
OpenPOWER on IntegriCloud