Skip to content

Commit

Permalink
Fix instance filtering by instance state.
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartcaunt committed Dec 19, 2024
1 parent eb1ed66 commit f2ec82c
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,10 @@ protected List<Predicate> convertFilterToPredicates(final InstanceFilter filter,
predicates.add(cb.equal(memberJoin.get("role"), InstanceMemberRole.OWNER));
}

if (filter.getState() != null) {
predicates.add(cb.equal(root.get("state"), filter.getState()));
}

if (filter.getInstrumentId() != null) {
Join<Instance, Experiment> experimentJoin = context.getExperimentJoin();
predicates.add(cb.equal(experimentJoin.get("instrument").get("id"), filter.getInstrumentId()));
Expand Down

0 comments on commit f2ec82c

Please sign in to comment.