From 3e993d35a09dbd2d13ecd00a7f311f75f5e0f2d7 Mon Sep 17 00:00:00 2001 From: Oliver Giles Date: Fri, 13 Nov 2020 14:02:00 +1300 Subject: [PATCH] no badges for unfinished runs do not attempt to generate badges for runs which have not yet finished. resolves #134 --- src/laminar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/laminar.cpp b/src/laminar.cpp index 9700c56..5db484f 100644 --- a/src/laminar.cpp +++ b/src/laminar.cpp @@ -784,7 +784,7 @@ kj::Maybe> Laminar::getArtefact(std::string path bool Laminar::handleBadgeRequest(std::string job, std::string &badge) { RunState rs = RunState::UNKNOWN; - db->stmt("SELECT result FROM builds WHERE name = ? ORDER BY number DESC LIMIT 1") + db->stmt("SELECT result FROM builds WHERE name = ? AND result IS NOT NULL ORDER BY number DESC LIMIT 1") .bind(job) .fetch([&](int result){ rs = RunState(result);