From f12946981a3d8e2a041f3fe00ef2feb9c8596abe Mon Sep 17 00:00:00 2001 From: Simon Quigley Date: Mon, 16 Dec 2024 11:18:20 -0600 Subject: [PATCH] Datetimes aren't bools --- cpp/fetch-indexes.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cpp/fetch-indexes.cpp b/cpp/fetch-indexes.cpp index 39286f9..bde7623 100644 --- a/cpp/fetch-indexes.cpp +++ b/cpp/fetch-indexes.cpp @@ -20,7 +20,7 @@ #include "build.h" #include "distribution.h" #include "person.h" -#include "source.h" +#include "source_package_publishing_history.h" #include #include @@ -176,7 +176,7 @@ int check_pending_packages(const std::string& release) { for (auto build : src.getBuilds()) { auto bs = build.buildstate; if (bs == "Currently building") { - if (build.date_started && build.date_started >= one_hour_ago) { + if (build.date_started >= one_hour_ago) { total_pending += 1; } } else if (bs == "Needs building") { @@ -221,7 +221,7 @@ int check_pending_packages(const std::string& release) { for (auto br : records_gen) records.push_back(br); for (auto &build_record : records) { - if (build_record.datebuilt && build_record.datebuilt < three_hours_ago) { + if (build_record.datebuilt < three_hours_ago) { source_packages.clear(); break; }