From: Michael Wood <michael.g.wood@intel.com>
To: "toaster@yoctoproject.org" <toaster@yoctoproject.org>
Subject: Re: [PATCH] toaster: fix typo which causes table searches to fail
Date: Thu, 16 Jun 2016 15:04:03 +0100 [thread overview]
Message-ID: <5762B1D3.1030303@intel.com> (raw)
In-Reply-To: <1466084896-27129-1-git-send-email-elliot.smith@intel.com>
Looks good to me. Send to bitbake-devel and applied to toaster-next.
Thanks,
Michael
On 16/06/16 14:48, Elliot Smith wrote:
> The iterator used to create a search query refers to a
> variable "x" which isn't set, causing an "'x' is not defined" error
> and preventing table searches (on non-ToasterTables) from working.
>
> Use the "field" variable instead, which contains the name of the
> field to add to the query.
>
> [YOCTO #9749]
>
> Signed-off-by: Elliot Smith <elliot.smith@intel.com>
> ---
> bitbake/lib/toaster/toastergui/views.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py
> index 0254876..28ff67b 100755
> --- a/bitbake/lib/toaster/toastergui/views.py
> +++ b/bitbake/lib/toaster/toastergui/views.py
> @@ -324,7 +324,7 @@ def _get_search_results(search_term, queryset, model):
> for st in search_term.split(" "):
> queries = None
> for field in model.search_allowed_fields:
> - query = Q(**{x+'__icontains': st})
> + query = Q(**{field + '__icontains': st})
> queries = queries | query if queries else query
>
> search_object = search_object & queries if search_object else queries
next prev parent reply other threads:[~2016-06-16 14:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-16 13:48 [PATCH] toaster: fix typo which causes table searches to fail Elliot Smith
2016-06-16 14:04 ` Michael Wood [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-06-16 14:02 Michael Wood
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=5762B1D3.1030303@intel.com \
--to=michael.g.wood@intel.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.