From 0a5008e30e1816143dacc453f1cba52b93bf0797 Mon Sep 17 00:00:00 2001 From: Chrystian Huot Date: Fri, 13 Mar 2020 10:26:20 -0400 Subject: [PATCH] Regression bug: Give systems sorted by their number --- server/lib/rdio-scanner/graphql/datasources/get-systems.js | 4 +++- .../lib/rdio-scanner/routes/trunk-recorder-system-upload.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/server/lib/rdio-scanner/graphql/datasources/get-systems.js b/server/lib/rdio-scanner/graphql/datasources/get-systems.js index a2497c1..c1fc8ee 100644 --- a/server/lib/rdio-scanner/graphql/datasources/get-systems.js +++ b/server/lib/rdio-scanner/graphql/datasources/get-systems.js @@ -2,7 +2,9 @@ function getSystems(models) { return async () => { - const systems = await models.rdioScannerSystem.findAll(); + const systems = await models.rdioScannerSystem.findAll({ + order: [['system', 'ASC']], + }); return systems; }; diff --git a/server/lib/rdio-scanner/routes/trunk-recorder-system-upload.js b/server/lib/rdio-scanner/routes/trunk-recorder-system-upload.js index 589d35d..5a26478 100644 --- a/server/lib/rdio-scanner/routes/trunk-recorder-system-upload.js +++ b/server/lib/rdio-scanner/routes/trunk-recorder-system-upload.js @@ -58,7 +58,7 @@ class TrunkRecorderSystemUpload { } const emit = async () => { - const systems = await models.rdioScannerSystem.findAll(); + const systems = await models.rdioScannerSystem.findAll({ order: [['system', 'ASC']]}); pubsub.publish('rdioScannerSystems', { rdioScannerSystems: systems }); };