All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Wood <michael.g.wood@intel.com>
To: Dave Lerner <dave.lerner@windriver.com>,
	toaster@yoctoproject.org, belen.barros.pena@linux.intel.com
Subject: Re: [PATCH 1/1] toaster: remove custom images from Image Recipes
Date: Mon, 22 Feb 2016 16:40:49 +0000	[thread overview]
Message-ID: <56CB3A11.4070606@intel.com> (raw)
In-Reply-To: <1455921136-26353-2-git-send-email-dave.lerner@windriver.com>

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@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)
>   
>   






      parent reply	other threads:[~2016-02-22 16:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-19 22:32 [review-request] remove custom images from Image Recipes page Dave Lerner
2016-02-19 22:32 ` [PATCH 1/1] toaster: remove custom images from Image Recipes Dave Lerner
2016-02-22 13:48   ` Barros Pena, Belen
2016-02-22 14:10     ` Barros Pena, Belen
2016-02-22 16:40   ` Michael Wood [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56CB3A11.4070606@intel.com \
    --to=michael.g.wood@intel.com \
    --cc=belen.barros.pena@linux.intel.com \
    --cc=dave.lerner@windriver.com \
    --cc=toaster@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.