Skip to content

Commit

Permalink
fix: apply corrections based on feedback received from the PR review
Browse files Browse the repository at this point in the history
  • Loading branch information
TheoPascoli committed Dec 2, 2024
1 parent af9b8f2 commit 97d9608
Show file tree
Hide file tree
Showing 3 changed files with 220 additions and 229 deletions.
4 changes: 1 addition & 3 deletions antarest/study/business/link_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
from antarest.study.storage.variantstudy.model.command.remove_link import RemoveLink
from antarest.study.storage.variantstudy.model.command.update_link import UpdateLink

_ALL_LINKS_PATH = "input/links"


class LinkManager:
def __init__(self, storage_service: StudyStorageService) -> None:
Expand Down Expand Up @@ -103,7 +101,7 @@ def update_link(self, study: RawStudy, area_from: str, area_to: str, link_update

return updated_link.to_dto()

def update_all_links(
def update_links(
self,
study: RawStudy,
update_links_by_ids: t.Mapping[t.Tuple[str, str], LinkBaseDTO],
Expand Down
2 changes: 1 addition & 1 deletion antarest/study/business/table_mode_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def update_table_data(
return data
elif table_type == TableModeType.LINK:
links_map = {tuple(key.split(" / ")): LinkBaseDTO(**values) for key, values in data.items()}
updated_map = self._link_manager.update_all_links(study, links_map) # type: ignore
updated_map = self._link_manager.update_links(study, links_map) # type: ignore
excludes = (
set()
if StudyVersion.parse(study.version) >= STUDY_VERSION_8_2
Expand Down
Loading

0 comments on commit 97d9608

Please sign in to comment.