From 16f3efb81a3beaf084bef97f60ea29232ea998a7 Mon Sep 17 00:00:00 2001 From: Abhijeet Date: Thu, 8 Aug 2024 13:26:21 +0530 Subject: [PATCH] chore: Make sure to fetch page details only after datasource validation --- .../server/solutions/ce/AuthenticationServiceCEImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/AuthenticationServiceCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/AuthenticationServiceCEImpl.java index b78a62992390..eec29d9169db 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/AuthenticationServiceCEImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/AuthenticationServiceCEImpl.java @@ -140,8 +140,8 @@ public Mono getAuthorizationCodeURLForGenericOAuth2( }) .switchIfEmpty(Mono.error( new AppsmithException(AppsmithError.NO_RESOURCE_FOUND, FieldName.DATASOURCE, datasourceId))) - .flatMap(this::validateRequiredFieldsForGenericOAuth2) - .zipWith(Mono.zip(workspaceIdMono, trueEnvironmentIdCached, newPageMono)) + .flatMap(ds -> this.validateRequiredFieldsForGenericOAuth2(ds) + .zipWith(Mono.zip(workspaceIdMono, trueEnvironmentIdCached, newPageMono))) .flatMap(tuple2 -> { DatasourceStorage datasourceStorage = tuple2.getT1(); String workspaceId = tuple2.getT2().getT1();