Skip to content
Snippets Groups Projects
Commit 2ef70777 authored by Rick Herrick's avatar Rick Herrick
Browse files

XNAT-1612 XNAT-4413 Added check for blank site URL preference setting in

addition to existing no-value check.
parent 24d30183
No related branches found
No related tags found
No related merge requests found
...@@ -118,7 +118,7 @@ public class SiteConfigApi extends AbstractXapiRestController { ...@@ -118,7 +118,7 @@ public class SiteConfigApi extends AbstractXapiRestController {
if (_log.isInfoEnabled()) { if (_log.isInfoEnabled()) {
_log.info("The site is being initialized by user {}. Setting default values from context.", username); _log.info("The site is being initialized by user {}. Setting default values from context.", username);
} }
if (!preferences.containsKey("siteUrl")) { if (!preferences.containsKey("siteUrl") || StringUtils.isBlank(preferences.get("siteUrl").toString())) {
preferences.put("siteUrl", XnatHttpUtils.getServerRoot(request)); preferences.put("siteUrl", XnatHttpUtils.getServerRoot(request));
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment