Skip to content

Commit 4e8cfbf

Browse files
Fixes #413.
1 parent 518da43 commit 4e8cfbf

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## v4.0.1 (unreleased)
44

5+
- structurizr-client: Fixes https://github.com/structurizr/java/issues/413 (Cannot push to main branch, when branch feature is activated).
56
- structurizr-dsl: Allows archetypes to be used via workspace extension.
67
- structurizr-dsl: Adds archetype support for custom elements.
78
- structurizr-dsl: Fixes https://github.com/structurizr/java/issues/399 (Archetype tags sometimes missing).

structurizr-client/src/main/java/com/structurizr/api/WorkspaceApiClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ public void putWorkspace(long workspaceId, Workspace workspace) throws Structuri
313313
workspace.setLastModifiedUser(getUser());
314314

315315
HttpPut httpPut;
316-
if (StringUtils.isNullOrEmpty(branch)) {
316+
if (StringUtils.isNullOrEmpty(branch) || branch.equalsIgnoreCase(MAIN_BRANCH)) {
317317
httpPut = new HttpPut(url + WORKSPACE_PATH + "/" + workspaceId);
318318
} else {
319319
httpPut = new HttpPut(url + WORKSPACE_PATH + "/" + workspaceId + "/branch/" + branch);

0 commit comments

Comments
 (0)