Skip to content

Commit

Permalink
Check for None in symlink target (#19)
Browse files Browse the repository at this point in the history
Co-authored-by: Automated Analysis - BCCDC <[email protected]>
  • Loading branch information
dfornika and Automated Analysis - BCCDC authored Jun 7, 2023
1 parent 178fbdb commit e3ff5b4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions auto_fastq_symlink/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,11 @@ def create_symlinks(config: dict[str, object], symlinks_to_create_by_project_id:

symlinks_complete_by_project_id[project_id] = []
for symlink in symlinks:
# Defend against cases where symlink target is None
# See https://github.com/BCCDC-PHL/auto-fastq-symlink/issues/18
if symlink['target'] is None:
continue

symlink_parent_dir = os.path.join(project_fastq_symlinks_dir, symlink['sequencing_run_id'])

if not os.path.exists(symlink_parent_dir):
Expand Down

0 comments on commit e3ff5b4

Please sign in to comment.