diff --git a/app/server/appsmith-git/src/main/java/com/appsmith/git/files/FileUtilsCEImpl.java b/app/server/appsmith-git/src/main/java/com/appsmith/git/files/FileUtilsCEImpl.java index e8aaf2898e..8503257247 100644 --- a/app/server/appsmith-git/src/main/java/com/appsmith/git/files/FileUtilsCEImpl.java +++ b/app/server/appsmith-git/src/main/java/com/appsmith/git/files/FileUtilsCEImpl.java @@ -719,7 +719,6 @@ public class FileUtilsCEImpl implements FileInterface { @Override public Mono constructGitResourceMapFromGitRepo(Path repositorySuffix, String refName) { - // TODO: check that we need to checkout to the ref Path repositoryPath = Paths.get(gitServiceConfig.getGitRootPath()).resolve(repositorySuffix); return Mono.fromCallable(() -> fetchGitResourceMap(repositoryPath)).subscribeOn(scheduler); } diff --git a/app/server/appsmith-interfaces/src/main/java/com/appsmith/external/models/RefAwareDomain.java b/app/server/appsmith-interfaces/src/main/java/com/appsmith/external/models/RefAwareDomain.java index 16b40bd91f..37b2db1f6d 100644 --- a/app/server/appsmith-interfaces/src/main/java/com/appsmith/external/models/RefAwareDomain.java +++ b/app/server/appsmith-interfaces/src/main/java/com/appsmith/external/models/RefAwareDomain.java @@ -55,6 +55,8 @@ public abstract class RefAwareDomain extends GitSyncedDomain { public void sanitiseToExportDBObject() { this.setBaseId(null); this.setBranchName(null); + this.setRefType(null); + this.setRefName(null); super.sanitiseToExportDBObject(); } diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/git/fs/GitFSServiceCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/git/fs/GitFSServiceCEImpl.java index 7194455ae1..59e69f75b9 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/git/fs/GitFSServiceCEImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/git/fs/GitFSServiceCEImpl.java @@ -288,7 +288,7 @@ public class GitFSServiceCEImpl implements GitHandlingServiceCE { return fsGitHandler .resetToLastCommit(repoSuffix) - .then(commonGitFileUtils.constructArtifactExchangeJsonFromGitRepositoryWithAnalytics( + .flatMap(resetFlag -> commonGitFileUtils.constructArtifactExchangeJsonFromGitRepositoryWithAnalytics( artifactJsonTransformationDTO)); } diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/newactions/base/NewActionServiceCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/newactions/base/NewActionServiceCEImpl.java index ba9cc4ed0b..be6122088e 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/newactions/base/NewActionServiceCEImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/newactions/base/NewActionServiceCEImpl.java @@ -1480,7 +1480,9 @@ public class NewActionServiceCEImpl extends BaseService unpublishedPages, Optional optionalPermission) { return repository.findByPageIds(unpublishedPages, optionalPermission).doOnNext(newAction -> { this.setCommonFieldsFromNewActionIntoAction(newAction, newAction.getUnpublishedAction()); - this.setCommonFieldsFromNewActionIntoAction(newAction, newAction.getPublishedAction()); + if (newAction.getPublishedAction() != null) { + this.setCommonFieldsFromNewActionIntoAction(newAction, newAction.getPublishedAction()); + } }); }