[Patchew-devel] [PATCH 3/7] testing: do not consult the testing.started property

Paolo Bonzini pbonzini at redhat.com
Wed Apr 17 10:09:44 UTC 2019


The right way to check whether to show reset links is to look
for results that are in running/success/failure state, similar
to what is done for messages.  The testing.started property in
fact does not exist anymore.

Signed-off-by: Paolo Bonzini <pbonzini at redhat.com>
---
 mods/testing.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mods/testing.py b/mods/testing.py
index 80f5cad..e390e30 100644
--- a/mods/testing.py
+++ b/mods/testing.py
@@ -405,7 +405,7 @@ class TestingModule(PatchewModule):
         self.check_active_testers(project)
 
         if project.maintained_by(request.user) \
-                and project.get_property("testing.started"):
+                and self.get_testing_results(project, ~Q(status=Result.PENDING)).exists():
             project.extra_ops += self._build_reset_ops(project)
 
     def get_capability_probes(self, project):
-- 
2.21.0





More information about the Patchew-devel mailing list