Skip to content

Commit

Permalink
New diagnostics for collection update problem with GraphQL
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidCroftDKFZ committed Nov 18, 2024
1 parent 74a3f59 commit c0b4b3b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public static boolean merge(DirectoryCollectionGet directoryCollectionGet, Direc
* @return The DirectoryCollectionPut object with merged data, or null if an exception occurs.
*/
private static DirectoryCollectionPut merge(String collectionId, DirectoryCollectionGet directoryCollectionGet, DirectoryCollectionPut directoryCollectionPut) {
logger.info("Merging DirectoryCollectionGet into DirectoryCollectionPut for collectionId: " + collectionId);
try {
directoryCollectionPut.setName(collectionId, directoryCollectionGet.getName(collectionId));
directoryCollectionPut.setDescription(collectionId, directoryCollectionGet.getDescription(collectionId));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,14 @@ public List<String> getNetworkIds(String id) {
}

public String getName(String id) {
if (!getItem(id).containsKey("name"))
if (getItem(id) == null) {
logger.warn("DirectoryCollectionGet.getName: item is null for id: " + id + ", aborting");
return "";
}
if (!getItem(id).containsKey("name")) {
logger.warn("DirectoryCollectionGet.getName: no name key, aborting");
return "";
}
return (String) getItem(id).get("name");
}

Expand Down

0 comments on commit c0b4b3b

Please sign in to comment.