diff --git a/antarest/study/storage/variantstudy/model/command/create_binding_constraint.py b/antarest/study/storage/variantstudy/model/command/create_binding_constraint.py index a8c04d657f..5a832b7d29 100644 --- a/antarest/study/storage/variantstudy/model/command/create_binding_constraint.py +++ b/antarest/study/storage/variantstudy/model/command/create_binding_constraint.py @@ -75,9 +75,9 @@ class BindingConstraintProperties(BaseModel, extra=Extra.forbid, allow_populatio enabled: bool = True time_step: BindingConstraintFrequency = BindingConstraintFrequency.HOURLY operator: BindingConstraintOperator = BindingConstraintOperator.EQUAL - comments: str = "" - filter_year_by_year: str = "" - filter_synthesis: str = "" + comments: t.Optional[str] = None + filter_year_by_year: t.Optional[str] = None + filter_synthesis: t.Optional[str] = None class BindingConstraintProperties870(BindingConstraintProperties): diff --git a/tests/variantstudy/test_command_factory.py b/tests/variantstudy/test_command_factory.py index a0324a2722..09f45d30f3 100644 --- a/tests/variantstudy/test_command_factory.py +++ b/tests/variantstudy/test_command_factory.py @@ -132,6 +132,9 @@ def setup_class(self): "operator": "equal", "coeffs": {}, "values": "values", + "comments": "", + "filter_synthesis": "", + "filter_year_by_year": "", }, ), CommandDTO( @@ -144,7 +147,10 @@ def setup_class(self): "operator": "equal", "coeffs": {}, "values": "values", - } + "comments": "", + "filter_synthesis": "", + "filter_year_by_year": "", + }, ], ), CommandDTO( @@ -156,6 +162,9 @@ def setup_class(self): "operator": "equal", "coeffs": {}, "values": "values", + "comments": "", + "filter_synthesis": "", + "filter_year_by_year": "", }, ), CommandDTO( @@ -167,6 +176,9 @@ def setup_class(self): "time_step": "hourly", "operator": "equal", "coeffs": {}, + "comments": "", + "filter_synthesis": "", + "filter_year_by_year": "", } ], ),