Skip to content
This repository has been archived by the owner on Mar 31, 2019. It is now read-only.

Commit

Permalink
#24 - make strict input data check feature configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
kovax committed May 21, 2018
1 parent 8182060 commit 854a1c2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/org/cristalise/restapi/ItemCollection.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import org.cristalise.kernel.entity.proxy.ItemProxy;
import org.cristalise.kernel.persistency.outcome.Schema;
import org.cristalise.kernel.persistency.outcomebuilder.OutcomeBuilder;
import org.cristalise.kernel.process.Gateway;
import org.cristalise.kernel.utils.LocalObjectLoader;
import org.cristalise.kernel.utils.Logger;

Expand Down Expand Up @@ -122,7 +123,9 @@ public Response getCollectionUpdateFormTemplate(

List<String> names = getItemNames(dep.getClassProperties());

if (names.size() == 0) throw ItemUtils.createWebAppException("No Item was found", Response.Status.NOT_FOUND);
if (Gateway.getProperties().getBoolean("REST.CollectionForm.checkInputs", false)) {
if (names.size() == 0) throw ItemUtils.createWebAppException("No Item was found", Response.Status.NOT_FOUND);
}

HashMap<String, Object> inputs = new HashMap<>();
inputs.put("memberNames", names);
Expand Down

0 comments on commit 854a1c2

Please # to comment.