Skip to content

Commit fd862eb

Browse files
angusmcbangusmcb
andauthored
from_dict adds valve vertices (#519)
* from_dict adds valve vertices * Revert all of the flake8 changes --------- Co-authored-by: angusmcb <git@zog.mozmail.com>
1 parent 9bed468 commit fd862eb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

wntr/network/io.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ def from_dict(d: dict, append=None):
258258
v = wn.get_link(name)
259259
if valve_type.lower() == "gpv":
260260
v.headloss_curve_name = link.setdefault("headloss_curve_name")
261+
v.vertices = link.setdefault("vertices", list())
261262
# custom additional attributes
262263
for attr in list(set(link.keys()) - set(dir(v))):
263264
setattr( v, attr, link[attr] )

0 commit comments

Comments
 (0)