Skip to content

Commit

Permalink
edge validation fix
Browse files Browse the repository at this point in the history
(cherry picked from commit 8bb21c1)
  • Loading branch information
visr committed Nov 28, 2023
1 parent 90be051 commit 5ed9d31
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/src/validation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ neighbortypes(::Val{:discrete_control}) = Set((
:tabulated_rating_curve,
:linear_resistance,
:manning_resistance,
:fractioal_flow,
:fractional_flow,
:pid_control,
))
neighbortypes(::Val{:pid_control}) = Set((:pump, :outlet))
Expand Down Expand Up @@ -446,8 +446,8 @@ function valid_edges(graph::MetaGraph)::Bool

if !(type_dst in neighbortypes(type_src))
errors = true
edge_id = graph[id_src, id_dst].id.value
@error "Cannot connect a $type_src to a $type_dst (edge #$edge_id from node $id_src to $id_dst)."
edge_id = graph[id_src, id_dst].id
@error "Cannot connect a $type_src to a $type_dst (edge $edge_id from node $id_src to $id_dst)."

Check warning on line 450 in core/src/validation.jl

View check run for this annotation

Codecov / codecov/patch

core/src/validation.jl#L449-L450

Added lines #L449 - L450 were not covered by tests
end
end
return !errors
Expand Down

0 comments on commit 5ed9d31

Please sign in to comment.