[gnome-continuous-yocto/gnomeostree-3.28-rocko: 982/8267] bitbake: toaster: fix typo which causes table searches to fail
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 982/8267] bitbake: toaster: fix typo which causes table searches to fail
- Date: Sat, 16 Dec 2017 21:11:21 +0000 (UTC)
commit 34dc5b35737d7e6fd0742414614a7676115e2ab8
Author: Elliot Smith <elliot smith intel com>
Date: Thu Jun 16 15:02:00 2016 +0100
bitbake: toaster: fix typo which causes table searches to fail
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]
(Bitbake rev: a3ebeb37f7bd4cffe6707c634b4f0a0ea52ccc45)
Signed-off-by: Elliot Smith <elliot smith intel com>
Signed-off-by: Michael Wood <michael g wood intel com>
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
bitbake/lib/toaster/toastergui/views.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]