diff --git a/server/models/Document.ts b/server/models/Document.ts index 230ec4c1c..99e5ea707 100644 --- a/server/models/Document.ts +++ b/server/models/Document.ts @@ -767,11 +767,12 @@ class Document extends ParanoidModel { * @param options Optional transaction to use for the query * @returns Promise resolving to a NavigationNode */ - toNavigationNode = async (options?: { - transaction?: Transaction | null | undefined; - }): Promise => { + toNavigationNode = async ( + options?: FindOptions + ): Promise => { const childDocuments = await (this.constructor as typeof Document) .unscoped() + .scope("withoutState") .findAll({ where: { teamId: this.teamId,