From: Michael Tremer Date: Thu, 13 Oct 2022 15:36:35 +0000 (+0000) Subject: jobs: Use the same interface to check if failed X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ec4eed32110ded7a2dd3824867ee240161c571f;p=pbs.git jobs: Use the same interface to check if failed Signed-off-by: Michael Tremer --- diff --git a/src/buildservice/jobs.py b/src/buildservice/jobs.py index 12912ef3..c73c4e75 100644 --- a/src/buildservice/jobs.py +++ b/src/buildservice/jobs.py @@ -294,6 +294,13 @@ class Job(base.DataObject): """ return self.data.failed + def has_failed(self): + """ + Returns True if this job has failed + """ + if self.has_finished(): + return self.data.failed + @property def message(self): return self.data.message diff --git a/src/templates/builds/modules/list.html b/src/templates/builds/modules/list.html index 932f4cdc..b2ebd7ee 100644 --- a/src/templates/builds/modules/list.html +++ b/src/templates/builds/modules/list.html @@ -14,7 +14,7 @@

{% for job in build.jobs %} {{ _("Failed") }} {% end %}