Skip to content

Commit

Permalink
serialize_term_data removed
Browse files Browse the repository at this point in the history
  • Loading branch information
vargastat committed Dec 5, 2024
1 parent e6efb3d commit aa5ef2d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions src/antares/model/binding_constraint.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,6 @@ def generate_id(cls, data: Union[Dict[str, str], LinkData, ClusterData]) -> str:
return "%".join(sorted((data.area1.lower(), data.area2.lower())))
return ".".join((data.area.lower(), data.cluster.lower()))

def serialize_term_data(self) -> Optional[str]:
return self.weight_offset()


class DefaultBindingConstraintProperties(BaseModel, extra="forbid", populate_by_name=True, alias_generator=to_camel):
"""Default properties for binding constraints
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def _write_binding_constraint_ini(
if existing_section:
existing_terms = current_ini_content[existing_section]

serialized_terms = {term.id: term.serialize_term_data() for term in terms} if terms else {}
serialized_terms = {term.id: term.weight_offset() for term in terms} if terms else {}

existing_terms.update(serialized_terms) # type: ignore
current_ini_content[existing_section] = existing_terms
Expand Down

0 comments on commit aa5ef2d

Please sign in to comment.