perf: Do not load state to calculate navigation node
This commit is contained in:
@@ -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<NavigationNode> => {
|
||||
toNavigationNode = async (
|
||||
options?: FindOptions<Document>
|
||||
): Promise<NavigationNode> => {
|
||||
const childDocuments = await (this.constructor as typeof Document)
|
||||
.unscoped()
|
||||
.scope("withoutState")
|
||||
.findAll({
|
||||
where: {
|
||||
teamId: this.teamId,
|
||||
|
||||
Reference in New Issue
Block a user