|
|
@@ -1066,6 +1066,7 @@ module.exports = function(crowi) {
|
|
|
, Attachment = crowi.model('Attachment')
|
|
|
, Comment = crowi.model('Comment')
|
|
|
, Revision = crowi.model('Revision')
|
|
|
+ , PageGroupRelation = crowi.model('PageGroupRelation')
|
|
|
, Page = this
|
|
|
, pageId = pageData._id
|
|
|
;
|
|
|
@@ -1085,6 +1086,8 @@ module.exports = function(crowi) {
|
|
|
return Page.removePageById(pageId);
|
|
|
}).then(function(done) {
|
|
|
return Page.removeRedirectOriginPageByPath(pageData.path);
|
|
|
+ }).then(function(done) {
|
|
|
+ return PageGroupRelation.removeAllByPage(pageData);
|
|
|
}).then(function(done) {
|
|
|
pageEvent.emit('delete', pageData, user); // update as renamed page
|
|
|
resolve(pageData);
|