Skip to content

Commit

Permalink
fix: prevent getFlowByName method crash by refactoring #4128 (#4129)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgomer2001 authored Mar 13, 2023
1 parent f521f7a commit 092989b
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,7 @@ public List<Flow> getAllFlows() {
}

public Flow getFlowByName(String flowName) {
List<Flow> flows = persistenceEntryManager.findEntries(getAgamaFlowDn(flowName), Flow.class,
Filter.createEqualityFilter(Flow.ATTR_NAMES.QNAME, flowName), 1);
logger.debug("Agama Flow with flowName:{} flows:{}", flowName, flows);
if (!flows.isEmpty()) {
return flows.get(0);
}
return null;
return getFlowByDn(getAgamaFlowDn(flowName));
}

public Flow getFlowByDn(String dn) {
Expand Down

0 comments on commit 092989b

Please sign in to comment.