Skip to content

Commit

Permalink
Allow storage to be referenced without space character
Browse files Browse the repository at this point in the history
  • Loading branch information
Martijn Dirkse committed Jan 6, 2025
1 parent 7ac15b7 commit 9cc525f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion src/main/java/nl/nn/testtool/TestTool.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2019-2024 WeAreFrank!, 2018 Nationale-Nederlanden
Copyright 2019-2025 WeAreFrank!, 2018 Nationale-Nederlanden
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -1099,6 +1099,13 @@ public Storage getStorage(String name) {
return storage;
}
}
String nameWithPossibleSpaces = name.replace("_", " ");
for (View view : views) {
Storage storage = view.getDebugStorage();
if (nameWithPossibleSpaces.equals(storage.getName())) {
return storage;
}
}
// TODO: Introduce views for test tab also and replace getViews() in TestToolApi with getTabs() (for now the
// frontend is using hardcoded storage name Test for test tab)
if (name.equals("Test")) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/nl/nn/testtool/web/api/ReportApi.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2021-2024 WeAreFrank!
Copyright 2021-2025 WeAreFrank!
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down

0 comments on commit 9cc525f

Please sign in to comment.