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

Paolo Bonzini posted 7 patches 6 years, 2 months ago
[Patchew-devel] [PATCH 3/7] testing: do not consult the testing.started property
Posted by Paolo Bonzini 6 years, 2 months ago
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@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


_______________________________________________
Patchew-devel mailing list
Patchew-devel@redhat.com
https://www.redhat.com/mailman/listinfo/patchew-devel