Skip to content

Commit

Permalink
quick fix regulation points
Browse files Browse the repository at this point in the history
Signed-off-by: Etienne LESOT <[email protected]>
  • Loading branch information
EtienneLt committed Oct 7, 2024
1 parent 9436977 commit 4dab1f5
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,15 @@ private RegulationPointAttributes getAttributes(Resource<?> resource) {
}

public Terminal getRegulatingTerminal() {
Terminal regulatingTerminal = TerminalRefUtils.getTerminal(index, getAttributes().getRegulatingTerminal());
Terminal localTerminal = TerminalRefUtils.getTerminal(index, getAttributes().getLocalTerminal());
return regulatingTerminal != null ? regulatingTerminal : localTerminal;
Terminal regulatingTerminal;
if (index.getIdentifiable(getAttributes().getRegulatingTerminal().getConnectableId()) == null) {
setRegulatingTerminalAsLocalTerminal();
regulatingTerminal = localTerminal;
} else {
regulatingTerminal = TerminalRefUtils.getTerminal(index, getAttributes().getRegulatingTerminal());
}
return regulatingTerminal;
}

public void setRegulatingTerminal(TerminalImpl<?> regulatingTerminal) {
Expand Down

0 comments on commit 4dab1f5

Please sign in to comment.