summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/toaster/toastergui/tables.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/bitbake/lib/toaster/toastergui/tables.py b/bitbake/lib/toaster/toastergui/tables.py
index 8d5166be55..e4cbec193e 100644
--- a/bitbake/lib/toaster/toastergui/tables.py
+++ b/bitbake/lib/toaster/toastergui/tables.py
@@ -251,9 +251,8 @@ class MachinesTable(ToasterTable, ProjectFiltersMixin):
251 251
252 def setup_queryset(self, *args, **kwargs): 252 def setup_queryset(self, *args, **kwargs):
253 prj = Project.objects.get(pk = kwargs['pid']) 253 prj = Project.objects.get(pk = kwargs['pid'])
254 compatible_layers = prj.compatible_layerversions() 254 self.queryset = prj.get_all_compatible_machines()
255 255 self.queryset = self.queryset.order_by(self.default_orderby)
256 self.queryset = Machine.objects.filter(layer_version__in=compatible_layers).order_by(self.default_orderby)
257 256
258 def setup_columns(self, *args, **kwargs): 257 def setup_columns(self, *args, **kwargs):
259 258
@@ -363,11 +362,7 @@ class RecipesTable(ToasterTable, ProjectFiltersMixin):
363 def setup_queryset(self, *args, **kwargs): 362 def setup_queryset(self, *args, **kwargs):
364 prj = Project.objects.get(pk = kwargs['pid']) 363 prj = Project.objects.get(pk = kwargs['pid'])
365 364
366 self.queryset = Recipe.objects.filter(layer_version__in = prj.compatible_layerversions()) 365 self.queryset = prj.get_all_compatible_recipes()
367
368 search_maxids = map(lambda i: i[0], list(self.queryset.values('name').distinct().annotate(max_id=Max('id')).values_list('max_id')))
369
370 self.queryset = self.queryset.filter(id__in=search_maxids).select_related('layer_version', 'layer_version__layer', 'layer_version__up_branch', 'layer_source')
371 self.queryset = self.queryset.order_by(self.default_orderby) 366 self.queryset = self.queryset.order_by(self.default_orderby)
372 367
373 368