From 5f12c51d932216906694c7f61ab2802d64034a13 Mon Sep 17 00:00:00 2001 From: Richard Millet Date: Mon, 14 Jan 2019 13:59:23 -0800 Subject: [PATCH] DRYD-565: Fixed authority-with-contact term startup initialization. --- .../org/collectionspace/services/common/UriInfoWrapper.java | 5 ++++- .../services/contact/nuxeo/ContactDocumentModelHandler.java | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/services/common/src/main/java/org/collectionspace/services/common/UriInfoWrapper.java b/services/common/src/main/java/org/collectionspace/services/common/UriInfoWrapper.java index 798abe3fa..1b9af536e 100644 --- a/services/common/src/main/java/org/collectionspace/services/common/UriInfoWrapper.java +++ b/services/common/src/main/java/org/collectionspace/services/common/UriInfoWrapper.java @@ -71,7 +71,10 @@ public class UriInfoWrapper implements UriInfo { @Override public String getPath() { - return uriInfo.getPath(); + if (uriInfo != null) + return uriInfo.getPath(); + else + return null; } @Override diff --git a/services/contact/service/src/main/java/org/collectionspace/services/contact/nuxeo/ContactDocumentModelHandler.java b/services/contact/service/src/main/java/org/collectionspace/services/contact/nuxeo/ContactDocumentModelHandler.java index eb12ee287..93d22b8dd 100644 --- a/services/contact/service/src/main/java/org/collectionspace/services/contact/nuxeo/ContactDocumentModelHandler.java +++ b/services/contact/service/src/main/java/org/collectionspace/services/contact/nuxeo/ContactDocumentModelHandler.java @@ -193,7 +193,7 @@ public class ContactDocumentModelHandler public String getUri(DocumentModel docModel) { String uri = ""; UriInfo ui = getServiceContext().getUriInfo(); - if (ui != null) { + if (ui != null && ui.getPath() != null) { uri = '/' + getAuthorityPathComponent(ui) + '/' + inAuthority + '/' + AuthorityClient.ITEMS + '/' + inItem + getServiceContextPath() + getCsid(docModel); -- 2.47.3