From 99ea4b73b542e537bfe33dee405c58f80f2422e5 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Sun, 31 Oct 2021 18:29:47 +0000 Subject: [PATCH] Server: Fixed issue that could cause server to return empty items in some rare cases --- packages/server/src/models/ItemModel.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/src/models/ItemModel.ts b/packages/server/src/models/ItemModel.ts index 85c2c0172ba..f97a7e99061 100644 --- a/packages/server/src/models/ItemModel.ts +++ b/packages/server/src/models/ItemModel.ts @@ -393,7 +393,7 @@ export default class ItemModel extends BaseModel { private childrenQuery(userId: Uuid, pathQuery: string = '', count: boolean = false, options: LoadOptions = {}): Knex.QueryBuilder { const query = this .db('user_items') - .leftJoin('items', 'user_items.item_id', 'items.id') + .innerJoin('items', 'user_items.item_id', 'items.id') .where('user_items.user_id', '=', userId); if (count) {