Skip to content

Commit

Permalink
Return only defined pools.
Browse files Browse the repository at this point in the history
  • Loading branch information
mnlipp committed Jan 18, 2025
1 parent 9b47ad3 commit d060a93
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public void onVmDefChanged(VmDefChanged event) {
*/
@Handler
public void onGetPools(GetPools event) {
event.setResult(pools.values().stream()
event.setResult(pools.values().stream().filter(VmPool::isDefined)
.filter(p -> event.name().isEmpty()
|| p.name().equals(event.name().get()))
.filter(p -> event.forUser().isEmpty() && event.forRoles().isEmpty()
Expand Down

0 comments on commit d060a93

Please sign in to comment.