From e572fb5697d90fc9270b5ea2a63abe311a8f8b3a Mon Sep 17 00:00:00 2001 From: Marcelo Pio de Castro Date: Fri, 23 Dec 2022 13:44:25 -0300 Subject: [PATCH] Fix refresh schema when source_catalog_id is not present on database --- .../airbyte/server/handlers/WebBackendConnectionsHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airbyte-server/src/main/java/io/airbyte/server/handlers/WebBackendConnectionsHandler.java b/airbyte-server/src/main/java/io/airbyte/server/handlers/WebBackendConnectionsHandler.java index a3c3886807f387..efc407813baef9 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/handlers/WebBackendConnectionsHandler.java +++ b/airbyte-server/src/main/java/io/airbyte/server/handlers/WebBackendConnectionsHandler.java @@ -343,7 +343,7 @@ public WebBackendConnectionRead webBackendGetConnection(final WebBackendConnecti final CatalogDiff diff; final AirbyteCatalog syncCatalog; final Optional currentSourceCatalogId = Optional.ofNullable(connection.getSourceCatalogId()); - if (refreshedCatalog.isPresent()) { + if (refreshedCatalog.isPresent() && catalogUsedToMakeConfiguredCatalog.isPresent()) { connection.sourceCatalogId(refreshedCatalog.get().getCatalogId()); /* * constructs a full picture of all existing configured + all new / updated streams in the newest