From 29b43c92f9bdc3f97e40f0d0fe1df1a5099528c6 Mon Sep 17 00:00:00 2001 From: Sascha Lisson Date: Tue, 5 Dec 2023 21:23:14 +0100 Subject: [PATCH] fix(model-server): add repository to the list after the first write The v1 model client doesn't initialize a repository using the REST API, but just starts writing to a branch. This first write should add the repository to the list returned by the REST API, which wasn't the case. --- .../org/modelix/model/server/handlers/RepositoriesManager.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/model-server/src/main/kotlin/org/modelix/model/server/handlers/RepositoriesManager.kt b/model-server/src/main/kotlin/org/modelix/model/server/handlers/RepositoriesManager.kt index 7b2a106ade..e607996d7b 100644 --- a/model-server/src/main/kotlin/org/modelix/model/server/handlers/RepositoriesManager.kt +++ b/model-server/src/main/kotlin/org/modelix/model/server/handlers/RepositoriesManager.kt @@ -165,6 +165,7 @@ class RepositoriesManager(val client: LocalModelClient) { mergedVersion.hash } putVersionHash(branch, mergedHash) + ensureRepositoriesAreInList(setOf(branch.repositoryId)) ensureBranchesAreInList(branch.repositoryId, setOf(branch.branchName)) result = mergedHash }