Browse Source

If the page is updated, it is not subject to automatic deletion.

Shun Miyazawa 2 years ago
parent
commit
db27586bf8
1 changed files with 5 additions and 0 deletions
  1. 5 0
      apps/app/src/server/service/page/index.ts

+ 5 - 0
apps/app/src/server/service/page/index.ts

@@ -4108,6 +4108,11 @@ class PageService implements IPageService {
     const clonedPageData = Page.hydrate(pageData.toObject());
     const newPageData = pageData;
 
+    // Do not consider it for automatic deletion if updated at least once
+    if (newPageData.wipExpiredAt != null) {
+      newPageData.wipExpiredAt = null;
+    }
+
     // use the previous data if absent
     const grant = options.grant ?? clonedPageData.grant;
     const grantUserGroupIds = options.userRelatedGrantUserGroupIds != null