Browse Source

remove unnecessary assignment of grantedGroups

Futa Arai 1 year ago
parent
commit
c420236880
1 changed files with 0 additions and 8 deletions
  1. 0 8
      apps/app/src/server/models/page.ts

+ 0 - 8
apps/app/src/server/models/page.ts

@@ -787,14 +787,6 @@ export async function pushRevision(pageData, newRevision, user) {
   pageData.lastUpdateUser = user?._id ?? user;
   pageData.lastUpdateUser = user?._id ?? user;
   pageData.updatedAt = Date.now();
   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();
   return pageData.save();
 }
 }