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( public ChartWorkspaceResponse getWorkspace(
ChartWorkspaceScope scope ChartWorkspaceScope scope
) { ) {
ChartWorkspace workspace = ChartWorkspace workspace =
repository.findByScope(scope) repository.findByScope(scope)
.orElseThrow(() -> .orElseGet(() ->
new IllegalArgumentException( repository.save(
"Workspace not found for scope: " new ChartWorkspace(
+ scope scope,
"fourGrid",
"[]"
)
) )
); );
@@ -32340,7 +32340,7 @@
"signed": false, "signed": false,
"validMin": null, "validMin": null,
"validMax": null "validMax": null
}, }
], ],
"schema": "sensor-definitions.v2.decoding-metadata" "schema": "sensor-definitions.v2.decoding-metadata"
} }