From 4501434ede5fdca5dd6f108d691a17aba47d8fd3 Mon Sep 17 00:00:00 2001 From: sidhantgoel Date: Sun, 11 Dec 2022 12:23:45 +0530 Subject: [PATCH] chore: Synchronize Page,Action and ActionCollection object from original corresponding object (#18846) Synchronize Page,Action and ActionCollection object from original corresponding object --- .../solutions/ce/ImportExportApplicationServiceCEImpl.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/ImportExportApplicationServiceCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/ImportExportApplicationServiceCEImpl.java index 9c9de133c6..59243b46e7 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/ImportExportApplicationServiceCEImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/ImportExportApplicationServiceCEImpl.java @@ -1306,6 +1306,8 @@ public class ImportExportApplicationServiceCEImpl implements ImportExportApplica newPage.getUnpublishedPage().setDeletedAt(branchedPage.getUnpublishedPage().getDeletedAt()); newPage.setDeletedAt(branchedPage.getDeletedAt()); newPage.setDeleted(branchedPage.getDeleted()); + // Set policies from existing branch object + newPage.setPolicies(branchedPage.getPolicies()); return newPageService.save(newPage); }); } @@ -1437,6 +1439,8 @@ public class ImportExportApplicationServiceCEImpl implements ImportExportApplica newAction.getUnpublishedAction().setDeletedAt(branchedAction.getUnpublishedAction().getDeletedAt()); newAction.setDeletedAt(branchedAction.getDeletedAt()); newAction.setDeleted(branchedAction.getDeleted()); + // Set policies from existing branch object + newAction.setPolicies(branchedAction.getPolicies()); return newActionService.save(newAction); }); } @@ -1591,6 +1595,8 @@ public class ImportExportApplicationServiceCEImpl implements ImportExportApplica .setDeletedAt(branchedActionCollection.getUnpublishedCollection().getDeletedAt()); actionCollection.setDeletedAt(branchedActionCollection.getDeletedAt()); actionCollection.setDeleted(branchedActionCollection.getDeleted()); + // Set policies from existing branch object + actionCollection.setPolicies(branchedActionCollection.getPolicies()); return Mono.zip( Mono.just(importedActionCollectionId), actionCollectionService.save(actionCollection)