From bf58113e39fa9853d06dc5708c1fe4554abb7505 Mon Sep 17 00:00:00 2001 From: Joey Zhou Date: Wed, 18 Dec 2024 05:35:35 -0800 Subject: [PATCH 1/2] fix: orderby --- src/db/tables/onerep_scans.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/db/tables/onerep_scans.ts b/src/db/tables/onerep_scans.ts index ac44edad613..92e3c17f51b 100644 --- a/src/db/tables/onerep_scans.ts +++ b/src/db/tables/onerep_scans.ts @@ -437,6 +437,7 @@ async function getScanResultsWithBrokerUnderMaintenance( .andWhere("sr.manually_resolved", "false") .andWhereNot("sr.status", "removed") .join("onerep_data_brokers as db", "sr.data_broker", "db.data_broker") + .orderBy("link") .orderBy("sr.onerep_scan_result_id"); scanResults = scanResults.filter( From 60281996053b6dab3d35af348dc4919fe4dfed4d Mon Sep 17 00:00:00 2001 From: Joey Zhou Date: Wed, 18 Dec 2024 05:41:59 -0800 Subject: [PATCH 2/2] fix: add to other func --- src/db/tables/onerep_scans.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/db/tables/onerep_scans.ts b/src/db/tables/onerep_scans.ts index 92e3c17f51b..3606a4f0298 100644 --- a/src/db/tables/onerep_scans.ts +++ b/src/db/tables/onerep_scans.ts @@ -476,6 +476,7 @@ async function getScanResultsWithBroker( .innerJoin("onerep_scans as s", "sr.onerep_scan_id", "s.onerep_scan_id") .where("s.onerep_profile_id", onerepProfileId) .join("onerep_data_brokers as db", "sr.data_broker", "db.data_broker") + .orderBy("link") .orderBy("sr.onerep_scan_result_id"); } else { scanResults = (await getLatestOnerepScanResults(onerepProfileId)).results;