Skip to content

Commit

Permalink
Fixed: Fetch Output Formats: If project type is null, return all outp…
Browse files Browse the repository at this point in the history
…ut formats.
  • Loading branch information
djuarezgf committed Mar 15, 2024
1 parent 3eae7ee commit 7f9f9ce
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/de/samply/project/ProjectService.java
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,9 @@ public OutputFormat[] fetchOutputFormats(@NotNull String projectCode) throws Pro
if (projectOptional.isEmpty()) {
throw new ProjectServiceException("Project " + projectCode + " not found");
}
if (projectOptional.get().getType() == null){
return OutputFormat.values();
}
return switch (projectOptional.get().getType()) {
case DATASHIELD -> new OutputFormat[]{OutputFormat.OPAL};
default ->
Expand Down

0 comments on commit 7f9f9ce

Please sign in to comment.