From ef42432362c1fd1eb533eb86798206acc3e0d43f Mon Sep 17 00:00:00 2001 From: Sergei Samokhvalov Date: Fri, 29 Nov 2024 15:37:33 +0300 Subject: [PATCH] Add spaces --- src/services/entry/actions/get-related-entries.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/services/entry/actions/get-related-entries.ts b/src/services/entry/actions/get-related-entries.ts index 08e7b56..e7225b4 100644 --- a/src/services/entry/actions/get-related-entries.ts +++ b/src/services/entry/actions/get-related-entries.ts @@ -70,7 +70,9 @@ export async function getRelatedEntries( .join('entries', 'entries.entryId', endToStart ? 'l.toId' : 'l.fromId') .where((builder) => { builder.where({isDeleted: false}); + builder.andWhere('depth', '<', 5); + if (scope) { builder.andWhere('entries.scope', scope); }