Skip to content

Commit

Permalink
remove unnecessary assignment of grantedGroups
Browse files Browse the repository at this point in the history
  • Loading branch information
arafubeatbox committed Sep 2, 2024
1 parent 6e9b361 commit c420236
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions apps/app/src/server/models/page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit c420236

Please sign in to comment.