diff options
author | Michael Wood <michael.g.wood@intel.com> | 2015-09-29 10:50:10 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-29 14:11:38 +0100 |
commit | f902dc646dbfdf31fded69a425fb88944a7d8fe3 (patch) | |
tree | b02530f2447725458a042103fb64fc765453e291 /bitbake/lib/toaster/toastergui/typeaheads.py | |
parent | fe29297c6a4e3096b0bdecde62a594a8e68f79c5 (diff) | |
download | poky-f902dc646dbfdf31fded69a425fb88944a7d8fe3.tar.gz |
bitbake: toaster: orm remove the complicated querying on the ORM
We no longer need to compute each layer_version and all the recipes
which belong to this.
[YOCTO #8147]
(Bitbake rev: 505979ab931e3a2a218d7030d6064987e8f9ff14)
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/typeaheads.py')
-rw-r--r-- | bitbake/lib/toaster/toastergui/typeaheads.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bitbake/lib/toaster/toastergui/typeaheads.py b/bitbake/lib/toaster/toastergui/typeaheads.py index d5bec58ea7..9db31827ba 100644 --- a/bitbake/lib/toaster/toastergui/typeaheads.py +++ b/bitbake/lib/toaster/toastergui/typeaheads.py | |||
@@ -27,7 +27,7 @@ class LayersTypeAhead(ToasterTypeAhead): | |||
27 | super(LayersTypeAhead, self).__init__() | 27 | super(LayersTypeAhead, self).__init__() |
28 | 28 | ||
29 | def apply_search(self, search_term, prj, request): | 29 | def apply_search(self, search_term, prj, request): |
30 | layers = prj.compatible_layerversions() | 30 | layers = prj.get_all_compatible_layer_versions() |
31 | layers = layers.order_by('layer__name') | 31 | layers = layers.order_by('layer__name') |
32 | 32 | ||
33 | # Unlike the other typeaheads we also don't want to show suggestions | 33 | # Unlike the other typeaheads we also don't want to show suggestions |
@@ -35,7 +35,8 @@ class LayersTypeAhead(ToasterTypeAhead): | |||
35 | # layerdeps to a new layer. | 35 | # layerdeps to a new layer. |
36 | if ("include_added" in request.GET and | 36 | if ("include_added" in request.GET and |
37 | request.GET['include_added'] != "true"): | 37 | request.GET['include_added'] != "true"): |
38 | layers = layers.exclude(pk__in=prj.projectlayer_equivalent_set) | 38 | layers = layers.exclude( |
39 | pk__in=prj.get_project_layer_versions(pk=True)) | ||
39 | 40 | ||
40 | primary_results = layers.filter(layer__name__istartswith=search_term) | 41 | primary_results = layers.filter(layer__name__istartswith=search_term) |
41 | secondary_results = layers.filter(layer__name__icontains=search_term).exclude(pk__in=primary_results) | 42 | secondary_results = layers.filter(layer__name__icontains=search_term).exclude(pk__in=primary_results) |