Skip to content

Commit

Permalink
Support parameters for loss_factor
Browse files Browse the repository at this point in the history
  • Loading branch information
s-simoncelli committed Feb 17, 2024
1 parent 319f952 commit 940814d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions pywr_editor/dialogs/node/sections/loss_link_node_section.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from pywr_editor.form import FieldConfig, FloatWidget
from pywr_editor.form import FieldConfig
from pywr_editor.form.widgets.parameter_line_edit_widget import ParameterLineEditWidget

from ..node_dialog_form import NodeDialogForm
from .abstract_node_section import AbstractNodeSection
Expand All @@ -18,10 +19,8 @@ def __init__(self, form: NodeDialogForm, section_data: dict):
additional_fields=[
FieldConfig(
name="loss_factor",
field_type=FloatWidget,
field_args={
"min_value": 0,
},
field_type=ParameterLineEditWidget,
min_value=0,
default_value=0,
value=form.field_value("loss_factor"),
help_text="The proportion of flow that is lost through this node",
Expand Down

0 comments on commit 940814d

Please sign in to comment.