Fix for issue #12
do not try to fetch premise if "premiseId" list is empty
This commit is contained in:
parent
93abe3e885
commit
88516ccfca
1 changed files with 2 additions and 0 deletions
|
|
@ -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 = """
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue