Displaying differences for changeset |
@@ -247,8 +247,8 @@ |
private void checkSoilComponentInputParameters(Map<String, JSONObject> soilGroup) throws ServiceException { |
for (String requiredSoilInput : requiredSoilInputs) { |
- if (!soilGroup.containsKey(requiredSoilInput)) { |
- throw new ServiceException("The input JSON is missing the required soil component value: " + requiredSoilInput); |
+ if (!soilGroup.containsKey(requiredSoilInput) || soilGroup.get(requiredSoilInput).optString("value", "error").equalsIgnoreCase("error") ) { |
+ throw new ServiceException("The input JSON is missing the required soil component value for: " + requiredSoilInput); |
} |
} |
} |