From 2cdd7a6e23a3e7e61d5808428751e5e76847fb55 Mon Sep 17 00:00:00 2001
From: paulboon
Date: Mon, 21 Oct 2024 14:44:11 +0200
Subject: [PATCH] Merge pull request #10720
---
.../edu/harvard/iq/dataverse/DatasetVersionServiceBean.java | 4 ++--
src/main/webapp/dataset-license-terms.xhtml | 2 +-
src/main/webapp/template.xhtml | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/main/java/edu/harvard/iq/dataverse/DatasetVersionServiceBean.java b/src/main/java/edu/harvard/iq/dataverse/DatasetVersionServiceBean.java
index 076893863af..762319884b9 100644
--- a/src/main/java/edu/harvard/iq/dataverse/DatasetVersionServiceBean.java
+++ b/src/main/java/edu/harvard/iq/dataverse/DatasetVersionServiceBean.java
@@ -317,8 +317,8 @@ private void msg(String s){
}
public boolean isVersionDefaultCustomTerms(DatasetVersion datasetVersion) {
-
- if (datasetVersion.getId() != null) {
+ //SEK - belt and suspenders here, but this is where the bug 10719 first manifested
+ if (datasetVersion != null && datasetVersion.getId() != null) {
try {
TermsOfUseAndAccess toua = (TermsOfUseAndAccess) em.createNamedQuery("TermsOfUseAndAccess.findByDatasetVersionIdAndDefaultTerms")
.setParameter("id", datasetVersion.getId()).setParameter("defaultTerms", TermsOfUseAndAccess.DEFAULT_NOTERMS).getSingleResult();
diff --git a/src/main/webapp/dataset-license-terms.xhtml b/src/main/webapp/dataset-license-terms.xhtml
index 42a4c3ec5f5..255e63fbfc2 100644
--- a/src/main/webapp/dataset-license-terms.xhtml
+++ b/src/main/webapp/dataset-license-terms.xhtml
@@ -44,7 +44,7 @@
-
+
diff --git a/src/main/webapp/template.xhtml b/src/main/webapp/template.xhtml
index 280d5ed05b9..12dca612f1b 100644
--- a/src/main/webapp/template.xhtml
+++ b/src/main/webapp/template.xhtml
@@ -114,7 +114,7 @@