Skip to content

Commit

Permalink
add optional is None
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinBelthle committed Aug 26, 2024
1 parent b770795 commit 65c8cda
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions antarest/study/business/binding_constraint_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,10 @@ class ConstraintTerm(BaseModel):
data: the constraint term data (link or cluster), if any.
"""

id: t.Optional[str]
weight: t.Optional[float]
offset: t.Optional[int]
data: t.Optional[t.Union[LinkTerm, ClusterTerm]]
id: t.Optional[str] = None
weight: t.Optional[float] = None
offset: t.Optional[int] = None
data: t.Optional[t.Union[LinkTerm, ClusterTerm]] = None

@field_validator("id")
def id_to_lower(cls, v: t.Optional[str]) -> t.Optional[str]:
Expand Down

0 comments on commit 65c8cda

Please sign in to comment.