diff --git a/src/antares/model/binding_constraint.py b/src/antares/model/binding_constraint.py index 6e08f1e8..e5572f22 100644 --- a/src/antares/model/binding_constraint.py +++ b/src/antares/model/binding_constraint.py @@ -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 diff --git a/src/antares/service/local_services/binding_constraint_local.py b/src/antares/service/local_services/binding_constraint_local.py index c2ad7290..96556e3e 100644 --- a/src/antares/service/local_services/binding_constraint_local.py +++ b/src/antares/service/local_services/binding_constraint_local.py @@ -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