creates empty workspace if none is created

This commit is contained in:
litoral05
2026-05-28 10:09:15 +01:00
parent 4659620072
commit 460e57bc3a
2 changed files with 8 additions and 6 deletions
@@ -49,13 +49,15 @@ public class ChartWorkspaceService {
public ChartWorkspaceResponse getWorkspace(
ChartWorkspaceScope scope
) {
ChartWorkspace workspace =
repository.findByScope(scope)
.orElseThrow(() ->
new IllegalArgumentException(
"Workspace not found for scope: "
+ scope
.orElseGet(() ->
repository.save(
new ChartWorkspace(
scope,
"fourGrid",
"[]"
)
)
);
@@ -32340,7 +32340,7 @@
"signed": false,
"validMin": null,
"validMax": null
},
}
],
"schema": "sensor-definitions.v2.decoding-metadata"
}