[Patchew-devel] [PATCH v2 02/10] search: fix matches on property value

Paolo Bonzini pbonzini at redhat.com
Fri Sep 28 14:45:29 UTC 2018


Since we have changed the fields to JSONField, we do not need to pass
the values as strings.

Signed-off-by: Paolo Bonzini <pbonzini at redhat.com>
---
 api/search.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/api/search.py b/api/search.py
index e330ae8..17424c3 100644
--- a/api/search.py
+++ b/api/search.py
@@ -164,7 +164,7 @@ Search text keyword in the email message. Example:
                 q = Q(subject__contains='[PULL') | Q(subject__contains='[GIT PULL')
             elif cond == "reviewed":
                 q = Q(properties__name="reviewed",
-                      properties__value="true")
+                      properties__value=True)
             elif cond in ("obsoleted", "old"):
                 q = Q(properties__name="obsoleted-by",
                       properties__value__isnull=False) & \
@@ -175,7 +175,7 @@ Search text keyword in the email message. Example:
                       results__status=Result.SUCCESS)
             elif cond == "tested":
                 q = Q(properties__name="testing.done",
-                      properties__value="true")
+                      properties__value=True)
             elif cond == "merged":
                 q = Q(is_merged=True)
             else:
-- 
2.17.1





More information about the Patchew-devel mailing list