Skip to content

Commit

Permalink
fix(api-study): update following code review
Browse files Browse the repository at this point in the history
  • Loading branch information
mabw-rte committed Mar 4, 2024
1 parent 949c363 commit 511f17f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions antarest/study/business/area_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,8 @@ def create_area(self, study: Study, area_creation_info: AreaCreationDTO) -> Area
file_study = self.storage_service.get_storage(study).get_raw(study)

# check if area already exists
existing_area_ids = set(file_study.config.areas)
area_id = transform_name_to_id(area_creation_info.name)
if area_id in existing_area_ids:
if area_id in set(file_study.config.areas):
raise DuplicateAreaName(area_creation_info.name)

# Create area and apply changes in the study
Expand Down

0 comments on commit 511f17f

Please sign in to comment.