Skip to content

Commit

Permalink
Fix NPE when a non-logged in user opens a restricted file
Browse files Browse the repository at this point in the history
  • Loading branch information
fintanorbert committed Oct 26, 2023
1 parent f404a3f commit 161041d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/edu/harvard/iq/dataverse/FilePage.java
Original file line number Diff line number Diff line change
Expand Up @@ -1217,7 +1217,7 @@ public String getLanguage() {
}

public String getDatasetPersistentId() {
return new GlobalId(dataset).asString();
return dataset != null ? new GlobalId(dataset).asString() : null;
}

}

0 comments on commit 161041d

Please sign in to comment.