Skip to content

Commit

Permalink
change default return in junction properties to reflect default value…
Browse files Browse the repository at this point in the history
…s in add_junction
  • Loading branch information
kbonney committed Oct 21, 2024
1 parent d87a158 commit 80f6b69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wntr/network/elements.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def demand_pattern(self):
"""
if len(self.demand_timeseries_list) > 0:
return self.demand_timeseries_list[0].pattern_name
return 0.0
return None
@demand_pattern.setter
def demand_pattern(self, value):
raise RuntimeWarning('The demand_pattern property is read-only. Please modify using demand_timeseries_list[0].pattern_name')
Expand All @@ -240,7 +240,7 @@ def demand_category(self):
"""
if len(self.demand_timeseries_list) > 0:
return self.demand_timeseries_list[0].category
return 0.0
return None
@demand_category.setter
def demand_category(self, value):
raise RuntimeWarning('The demand_category property is read-only. Please modify using demand_timeseries_list[0].category.')
Expand Down

0 comments on commit 80f6b69

Please sign in to comment.