|
|
@@ -1303,6 +1303,7 @@ module.exports = function(crowi) {
|
|
|
};
|
|
|
|
|
|
pageSchema.statics.duplicate = async function(page, newPagePath, user) {
|
|
|
+ const Page = this;
|
|
|
// populate
|
|
|
await page.populate({ path: 'revision', model: 'Revision', select: 'body' }).execPopulate();
|
|
|
|
|
|
@@ -1312,7 +1313,7 @@ module.exports = function(crowi) {
|
|
|
options.grantUserGroupId = page.grantedGroup;
|
|
|
options.grantedUsers = page.grantedUsers;
|
|
|
|
|
|
- const createdPage = await createPageAction({
|
|
|
+ const createdPage = await Page.create({
|
|
|
path: newPagePath, user, body: page.revision.body, options,
|
|
|
});
|
|
|
|