From c420236880719f64804fd5e9b3a581c39e2a4e7b Mon Sep 17 00:00:00 2001 From: Futa Arai Date: Tue, 3 Sep 2024 02:09:51 +0900 Subject: [PATCH] remove unnecessary assignment of grantedGroups --- apps/app/src/server/models/page.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/apps/app/src/server/models/page.ts b/apps/app/src/server/models/page.ts index ee43a98948d..881029ddca0 100644 --- a/apps/app/src/server/models/page.ts +++ b/apps/app/src/server/models/page.ts @@ -787,14 +787,6 @@ export async function pushRevision(pageData, newRevision, user) { pageData.lastUpdateUser = user?._id ?? user; pageData.updatedAt = Date.now(); - // Set the _id of grantedGroups to revision._id - if (pageData.grantedGroups.length > 0) { - pageData.grantedGroups = pageData.grantedGroups.map(group => ({ - ...group, - _id: newRevision._id, - })); - } - return pageData.save(); }