yohei0125 4 лет назад
Родитель
Сommit
95afebaf12
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      packages/app/src/server/service/page.ts

+ 3 - 1
packages/app/src/server/service/page.ts

@@ -564,7 +564,9 @@ class PageService {
 
   async restartPageRenameOperation(pageId: ObjectIdLike): Promise<void> {
     const pageOp = await PageOperation.findOne({ 'page.id': pageId, actionType: PageActionType.Rename, isFailure: true });
-    if (pageOp == null || pageOp.toPath == null) throw Error('PageRenameOperation is not executable');
+    if (pageOp == null || pageOp.toPath == null) {
+      throw Error('PageRenameOperation cannot be restarted as PageOperation to be processed is not found');
+    }
 
     pageOp.actionStage = PageActionStage.Main; // to restart from the beginning