Skip to content

Commit

Permalink
remove old usage of json.loads
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinBelthle committed Sep 30, 2024
1 parent d566a2d commit 8dcae78
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions antarest/study/business/binding_constraint_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

import collections
import copy
import json
import logging
import typing as t

Expand Down Expand Up @@ -854,7 +853,7 @@ def update_binding_constraints(
raise BindingConstraintNotFound(f"Binding constraint '{bc_id}' not found")

props = create_binding_constraint_config(study_version, **value.dict())
new_values = json.loads(props.json(by_alias=True, exclude_unset=True))
new_values = props.model_dump(mode='json', by_alias=True, exclude_unset=True)
upd_obj = config[dict_config[bc_id]]
current_value = copy.deepcopy(upd_obj)
upd_obj.update(new_values)
Expand Down

0 comments on commit 8dcae78

Please sign in to comment.