Fix for issue #12

do not try to fetch premise if "premiseId" list is empty
This commit is contained in:
Jan 2025-09-26 21:29:41 +02:00
parent 93abe3e885
commit 88516ccfca

View file

@ -124,6 +124,8 @@ public class PremiseRepository {
@Transactional(readOnly = true)
public List<Premise> getPremisesById(List<Integer> premiseIds) {
if(premiseIds.isEmpty())
return Collections.emptyList();
String placeholders = String.join(",", Collections.nCopies(premiseIds.size(), "?"));
String query = """