Skip to content

Commit

Permalink
fix(watcher): fix remove_duplicates in case of list of ids is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
olfamizen committed Feb 15, 2024
1 parent cd8fc11 commit 9cccd1f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions antarest/study/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -705,8 +705,8 @@ def remove_duplicates(self) -> None:
duplicates_by_path[path].append(study_id)
for path, study_ids in duplicates_by_path.items():
ids.extend(study_ids[1:])
# delete list ids
self.repository.delete(*ids)
if ids: # Check if ids is not empty
self.repository.delete(*ids)

def sync_studies_on_disk(self, folders: t.List[StudyFolder], directory: t.Optional[Path] = None) -> None:
"""
Expand Down

0 comments on commit 9cccd1f

Please sign in to comment.