Skip to contentSkip to conversation

toaster: fix typo which prevents filters from working

PATCH In review Elliot Smith 2 participants 2 messages Jun 7, 2016 – Jun 9, 2016

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 toaster: fix typo which prevents filters from working

'k' was replaced by 'key' at some point but not fixed in the body of the loop. This caused a failure when the the query was constructed for a filtered queryset, due to the variable not being defined.

---
 bitbake/lib/toaster/toastergui/views.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
bitbake/lib/toaster/toastergui/views.py +1 -1
index 16f98ee..9d06000 100755
@@ -268,7 +268,7 @@ def _get_filtering_query(filter_string):
         or_values = kv[1].split(OR_VALUE_SEPARATOR)
         query = None
         for key, val in zip(or_keys, or_values):
-            x = __get_q_for_val(k, val)
+            x = __get_q_for_val(key, val)
             query = query | x if query else x
 
         and_query = and_query & query if and_query else query
Signature · 12 lines
1.9.3

---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
#1 lore raw

Thanks pushed to toaster-next

Quoted 23 lines · Elliot Smith

'k' was replaced by 'key' at some point but not fixed in the body of the loop. This caused a failure when the the query was constructed for a filtered queryset, due to the variable not being defined.

---
  bitbake/lib/toaster/toastergui/views.py | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
bitbake/lib/toaster/toastergui/views.py +1 -1
index 16f98ee..9d06000 100755
@@ -268,7 +268,7 @@ def _get_filtering_query(filter_string):
          or_values = kv[1].split(OR_VALUE_SEPARATOR)
          query = None
          for key, val in zip(or_keys, or_values):
-            x = __get_q_for_val(k, val)
+            x = __get_q_for_val(key, val)
              query = query | x if query else x
 
          and_query = and_query & query if and_query else query