Skip to content
Snippets Groups Projects
Commit ac6538b2 authored by Mike McKay's avatar Mike McKay
Browse files

Temporary fix to get the configuration working so Charlie can test.

parent 1f9a6e87
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,7 @@ package org.nrg.xnat.restlet.services;
import org.apache.commons.lang3.StringUtils;
import org.hibernate.PropertyNotFoundException;
import org.json.JSONObject;
import org.nrg.config.entities.Configuration;
import org.nrg.config.exceptions.ConfigServiceException;
import org.nrg.dicomtools.filters.*;
......@@ -108,7 +109,7 @@ public class SettingsRestlet extends SecureResource {
if (StringUtils.isBlank(_property)) {
return mediaType == MediaType.TEXT_XML ?
new ItemXMLRepresentation(_arcSpec.getItem(), mediaType) :
new StringRepresentation("{\"ResultSet\":{\"Result\":" + toJson(getArcSpecAsMap()) + ", \"title\": \"Settings\"}}");
new StringRepresentation("{\"ResultSet\":{\"Result\":" + new JSONObject(getArcSpecAsMap()) + ", \"title\": \"Settings\"}}");
} else {
if (!getArcSpecAsMap().containsKey(_property)) {
throw new PropertyNotFoundException(String.format("Setting '%s' was not found in the system.", _property));
......
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