Datetimes aren't bools

main
Simon Quigley 7 days ago
parent 56bdd6f5e4
commit f12946981a

@ -20,7 +20,7 @@
#include "build.h" #include "build.h"
#include "distribution.h" #include "distribution.h"
#include "person.h" #include "person.h"
#include "source.h" #include "source_package_publishing_history.h"
#include <iostream> #include <iostream>
#include <fstream> #include <fstream>
@ -176,7 +176,7 @@ int check_pending_packages(const std::string& release) {
for (auto build : src.getBuilds()) { for (auto build : src.getBuilds()) {
auto bs = build.buildstate; auto bs = build.buildstate;
if (bs == "Currently building") { if (bs == "Currently building") {
if (build.date_started && build.date_started >= one_hour_ago) { if (build.date_started >= one_hour_ago) {
total_pending += 1; total_pending += 1;
} }
} else if (bs == "Needs building") { } 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 br : records_gen) records.push_back(br);
for (auto &build_record : records) { 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(); source_packages.clear();
break; break;
} }

Loading…
Cancel
Save