Skip to content

Commit

Permalink
finalize work on getters
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinBelthle committed Jan 22, 2025
1 parent 0ef0709 commit 46ac6b4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions antarest/study/business/link_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def get_all_links(self, study: Study) -> t.List[LinkDTO]:
file_study = self.storage_service.get_storage(study).get_raw(study)
result: t.List[LinkDTO] = []

# todo: here call get_all_links_ts_generation_information
ts_generation_parameters = self.get_all_links_ts_generation_information(study.id)

for area_id, area in file_study.config.areas.items():
links_config = file_study.tree.get(["input", "links", area_id, "properties"])
Expand All @@ -45,7 +45,9 @@ def get_all_links(self, study: Study) -> t.List[LinkDTO]:
link_tree_config: t.Dict[str, t.Any] = links_config[link]
link_tree_config.update({"area1": area_id, "area2": link})

# todo: check the DB map to update the link_tree_config
if area_id in ts_generation_parameters and link in ts_generation_parameters[area_id]:
link_ts_generation = ts_generation_parameters[area_id][link]
link_tree_config.update(link_ts_generation.model_dump(mode="json"))

link_internal = LinkInternal.model_validate(link_tree_config)

Expand Down

0 comments on commit 46ac6b4

Please sign in to comment.