summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/toaster/toastergui')
-rw-r--r--bitbake/lib/toaster/toastergui/tables.py2
-rw-r--r--bitbake/lib/toaster/toastergui/typeaheads.py5
2 files changed, 4 insertions, 3 deletions
diff --git a/bitbake/lib/toaster/toastergui/tables.py b/bitbake/lib/toaster/toastergui/tables.py
index 3354072e13..5cc04a2372 100644
--- a/bitbake/lib/toaster/toastergui/tables.py
+++ b/bitbake/lib/toaster/toastergui/tables.py
@@ -221,7 +221,7 @@ class MachinesTable(ToasterTable, ProjectFiltersMixin):
221 221
222 def setup_filters(self, *args, **kwargs): 222 def setup_filters(self, *args, **kwargs):
223 project = Project.objects.get(pk=kwargs['pid']) 223 project = Project.objects.get(pk=kwargs['pid'])
224 self.project_layers = project.projectlayer_equivalent_set() 224 self.project_layers = project.get_project_layer_versions()
225 225
226 self.add_filter(title="Filter by project machines", 226 self.add_filter(title="Filter by project machines",
227 name="in_current_project", 227 name="in_current_project",
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)