Skip to content

Commit

Permalink
Modifying drectory creation method
Browse files Browse the repository at this point in the history
  • Loading branch information
maxsibilla committed Oct 18, 2023
1 parent 2e1c54d commit 55771a0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/routes/entity_CRUD/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from pathlib import Path

from flask import Blueprint, jsonify, request, Response, current_app, abort, json
import logging
import requests
Expand Down Expand Up @@ -129,7 +131,7 @@ def multiple_components():
new_directory_path = ingest_helper.get_dataset_directory_absolute_path(dataset, requested_group_uuid, dataset['uuid'])
logger.info(
f"Creating a directory as: {new_directory_path} with a symbolic link to: {dataset['dataset_link_abs_dir']}")
os.makedirs(new_directory_path)
Path(new_directory_path).mkdir(parents=True, exist_ok=True)
os.symlink(dataset['dataset_link_abs_dir'], new_directory_path, True)
else:
return Response("Required field 'dataset_link_abs_dir' is missing from dataset", 500)
Expand Down

0 comments on commit 55771a0

Please sign in to comment.