[Toaster] [PATCH 1/1] toaster: remove custom images from Image Recipes
Michael Wood
michael.g.wood at intel.com
Mon Feb 22 08:40:49 PST 2016
On 19/02/16 22:32, Dave Lerner wrote:
> Fix the view of Image Recipes under Configuration to only show image
> recipes that are not customised, since custom images have their own
> page
>
> Signed-off-by: Dave Lerner <dave.lerner at windriver.com>
> ---
> bitbake/lib/toaster/toastergui/tables.py | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/bitbake/lib/toaster/toastergui/tables.py b/bitbake/lib/toaster/toastergui/tables.py
> index 86d111d..50a18e7 100644
> --- a/bitbake/lib/toaster/toastergui/tables.py
> +++ b/bitbake/lib/toaster/toastergui/tables.py
> @@ -549,7 +549,9 @@ 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.all()
One minor thing, we can make this QuerySet a bit more lightweight by
using the project field e.g.
CustomImageRecipe.objects.filter(project=kwargs['pid']) so that we're
only doing a query of all in the current project.
> + self.queryset = self.queryset.filter(
> + Q(is_image=True) & ~Q(pk__in=custom_image_recipes))
> self.queryset = self.queryset.order_by(self.default_orderby)
>
>
More information about the toaster
mailing list