Commit 4b2e8207 authored by Matija Obreza's avatar Matija Obreza

Fix: minor bugs

- API endpoint for ISO3166 vocabulary update
- Log exception details
- Support Executions without dimensions
parent fa24aad8
......@@ -136,7 +136,7 @@ public class ApiExceptionHandler {
@ExceptionHandler({ InvalidApiUsageException.class, DataIntegrityViolationException.class, ConcurrencyFailureException.class, FileRepositoryException.class, NotUniqueUserException.class })
@ResponseBody
public ApiError<Exception> handleInvalidApiUsage(final Exception e, final HttpServletRequest request) {
LOG.warn("{} for {} {}", e.getMessage(), request.getMethod(), request.getRequestURL()); //, e);
LOG.warn("{} for {} {}", e.getMessage(), request.getMethod(), request.getRequestURL(), e);
return new ApiError<>(e);
}
......
......@@ -116,7 +116,7 @@ public class GeoController extends ApiBaseController {
* @throws IOException Signals that an I/O exception has occurred.
*/
@PreAuthorize("hasRole('ADMINISTRATOR')")
@PostMapping(value = "/update")
@PostMapping(value = "/iso3166/update")
@ApiOperation("Triggers update of ISO country code vocabularies")
public String updateCountriesCodes() throws IOException {
LOG.info("Updating ISO country codes");
......
......@@ -202,9 +202,13 @@ public class Execution extends AuditedVersionedModel {
sb.append(" where ");
if (parameter.getCondition() != null) {
sb.append(alias).append(".").append(parameter.getCondition());
sb.append(" and ");
}
sb.append(where);
if (dimensions.size() > 0) {
if (parameter.getCondition() != null) {
sb.append(" and ");
}
sb.append(where);
}
}
return sb.toString();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment