diff options
author | Elliot Smith <elliot.smith@intel.com> | 2016-06-16 15:02:00 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-06-16 17:37:58 +0100 |
commit | 34dc5b35737d7e6fd0742414614a7676115e2ab8 (patch) | |
tree | de9ecd218fecd93f5afd3976c39557fc44ae4c13 /bitbake/lib/toaster | |
parent | d4a87b97185acf360695de392b336c2bdd739f46 (diff) | |
download | poky-34dc5b35737d7e6fd0742414614a7676115e2ab8.tar.gz |
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>
Diffstat (limited to 'bitbake/lib/toaster')
-rwxr-xr-x | 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 02548761f0..28ff67b76f 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): | |||
324 | for st in search_term.split(" "): | 324 | for st in search_term.split(" "): |
325 | queries = None | 325 | queries = None |
326 | for field in model.search_allowed_fields: | 326 | for field in model.search_allowed_fields: |
327 | query = Q(**{x+'__icontains': st}) | 327 | query = Q(**{field + '__icontains': st}) |
328 | queries = queries | query if queries else query | 328 | queries = queries | query if queries else query |
329 | 329 | ||
330 | search_object = search_object & queries if search_object else queries | 330 | search_object = search_object & queries if search_object else queries |