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); }