]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
toaster: remove custom images from Image Recipes
authorDave Lerner <dave.lerner@windriver.com>
Tue, 23 Feb 2016 12:34:45 +0000 (12:34 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 26 Feb 2016 17:17:24 +0000 (17:17 +0000)
Fix the view of 'Image Recipes' under 'Configuration' to only show
image recipes that are not customised since custom images have their
own page.

[YOCTO #9111]

Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/toaster/toastergui/tables.py

index b51e1b4f493cdfeb76cea9a010400b02e0a7510d..91153099ea0fffe15049ee1b47917770de00160f 100644 (file)
@@ -549,7 +549,10 @@ class ImageRecipesTable(RecipesTable):
     def setup_queryset(self, *args, **kwargs):
         super(ImageRecipesTable, self).setup_queryset(*args, **kwargs)
 
-        self.queryset = self.queryset.filter(is_image=True)
+        custom_image_recipes = CustomImageRecipe.objects.filter(
+                project=kwargs['pid'])
+        self.queryset = self.queryset.filter(
+                Q(is_image=True) & ~Q(pk__in=custom_image_recipes))
         self.queryset = self.queryset.order_by(self.default_orderby)