Parcourir la source

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

Shun Miyazawa il y a 2 ans
Parent
commit
db27586bf8
1 fichiers modifiés avec 5 ajouts et 0 suppressions
  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 clonedPageData = Page.hydrate(pageData.toObject());
     const newPageData = pageData;
     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
     // use the previous data if absent
     const grant = options.grant ?? clonedPageData.grant;
     const grant = options.grant ?? clonedPageData.grant;
     const grantUserGroupIds = options.userRelatedGrantUserGroupIds != null
     const grantUserGroupIds = options.userRelatedGrantUserGroupIds != null