From 56b0d7f5b13a8c96d13b2260be42eaf696bd3ba6 Mon Sep 17 00:00:00 2001 From: Shrikant Sharat Kandula Date: Mon, 1 Jul 2024 19:51:29 +0530 Subject: [PATCH] chore: Use `id` argument to find action collections (#34595) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is causing a test failure in `pg` because we're trying to extract the `id` out of a DTO that was originally passed to `.save()`, which doesn't work with Hibernate. This failure in `pg` got introduced by the test class changes in appsmithorg/appsmith#34535. /test sanity > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: > Commit: a29cf611a6f4dd8d6bd7a2da894252168cac56cf > Cypress dashboard. > Tags: `@tag.Sanity` ## Summary by CodeRabbit - **Bug Fixes** - Corrected the method call to ensure the correct parameter is used for updating unpublished action collections. --- .../server/services/ce/LayoutCollectionServiceCEImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/LayoutCollectionServiceCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/LayoutCollectionServiceCEImpl.java index 2d4a49bf40..b41b1a540a 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/LayoutCollectionServiceCEImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/LayoutCollectionServiceCEImpl.java @@ -397,7 +397,7 @@ public class LayoutCollectionServiceCEImpl implements LayoutCollectionServiceCE // First collect all valid action ids from before, and diff against incoming action ids Mono> deleteNonExistingActionMono = newActionService - .findByCollectionIdAndViewMode(actionCollectionDTO.getId(), false, actionPermission.getEditPermission()) + .findByCollectionIdAndViewMode(id, false, actionPermission.getEditPermission()) .filter(newAction -> !defaultActionIds.contains( newAction.getDefaultResources().getActionId())) .flatMap(x -> newActionService