From 023a30cb088f93e385077612f34995ea8efec7a4 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Wed, 8 Jul 2026 20:25:20 +0200 Subject: [PATCH] Drop uncollected placeholder rows from scan_result ScanResultGenerator pre-sizes its vector to the full expected image count, so GetResult() returned placeholder entries (number = -1, no angle) for images not yet collected. These leaked to the scan_result REST endpoint, where clients saw useless number=-1 rows and absent angle. Filter them out, matching the number<0 skip already used in FillEndMessage. Co-Authored-By: Claude Opus 4.8 --- common/ScanResultGenerator.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/ScanResultGenerator.cpp b/common/ScanResultGenerator.cpp index 3cc19bf1..f9256ffa 100644 --- a/common/ScanResultGenerator.cpp +++ b/common/ScanResultGenerator.cpp @@ -72,7 +72,10 @@ ScanResult ScanResultGenerator::GetResult() const { std::unique_lock ul(m); ScanResult ret; ret.file_prefix = file_prefix; - ret.images = v; + for (const auto &e: v) { + if (e.number >= 0) + ret.images.push_back(e); + } return ret; }