From 83d0db06078fb909cbec02d719739513976353f2 Mon Sep 17 00:00:00 2001 From: advplyr Date: Sat, 5 Aug 2023 16:37:26 -0500 Subject: [PATCH] Fix getting default library id for user --- server/models/Library.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/models/Library.js b/server/models/Library.js index 7f0f438d..1fb528cd 100644 --- a/server/models/Library.js +++ b/server/models/Library.js @@ -145,7 +145,8 @@ module.exports = (sequelize) => { */ static async getAllLibraryIds() { const libraries = await this.findAll({ - attributes: ['id'] + attributes: ['id', 'displayOrder'], + order: [['displayOrder', 'ASC']] }) return libraries.map(l => l.id) }