diff --git a/ui/src/bamboo/api/DataApiController.java b/ui/src/bamboo/api/DataApiController.java index 7c885d7..0d02e73 100644 --- a/ui/src/bamboo/api/DataApiController.java +++ b/ui/src/bamboo/api/DataApiController.java @@ -169,8 +169,9 @@ public void search(@RequestParam MultiValueMap params, var solrParams = new LinkedMultiValueMap(); solrParams.set("fq", "+auGov:true -discoverable:false"); solrParams.addAll(params); - var timeAllowed = Optional.ofNullable(solrParams.getFirst("timeAllowed")).map(Long::parseLong).orElse(0L); - if (timeAllowed > 60000L) timeAllowed = 60000L; + long maxTimeAllowed = 60000L; + var timeAllowed = Optional.ofNullable(solrParams.getFirst("timeAllowed")).map(Long::parseLong).orElse(maxTimeAllowed); + if (timeAllowed > maxTimeAllowed) timeAllowed = maxTimeAllowed; solrParams.set("timeAllowed", String.valueOf(timeAllowed)); if (!solrParams.containsKey("wt")) { solrParams.add("wt", "json");