Skip to content
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import javax.json.JsonReader;
import javax.json.JsonReaderFactory;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;

Expand Down Expand Up @@ -68,8 +69,10 @@ public Config getConfig() {
* @param stream the InputStream for the schema.
* @return the read schema.
*/
protected JsonSchema readSchema(InputStream stream) {
try (JsonSchemaReader reader = schemaReaderFactory.createSchemaReader(stream)) {
protected JsonSchema readSchema(InputStream stream) throws Exception{
byte[] bytes = stream.readAllBytes();
InputStream jsonStream = new ByteArrayInputStream(bytes);
try (JsonSchemaReader reader = schemaReaderFactory.createSchemaReader(jsonStream)) {
return reader.read();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,10 @@ public List<Map<String, Object>> getSearchFilterProperties(Map<String, Object> f
objectTypes.add("Asset");
objectTypes.add("CollectionImage");
}
if(StringUtils.equalsIgnoreCase("Question", (String) val) && !publishedStatus)
objectTypes.add("QuestionImage");
if(StringUtils.equalsIgnoreCase("QuestionSet", (String) val) && !publishedStatus)
objectTypes.add("QuestionSetImage");
}
entry.setValue(new ArrayList<String>(objectTypes));
}
Expand Down