Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updating get_ds_path to support uploads #143

Merged
merged 1 commit into from
Sep 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/routes/entity_CRUD/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,11 +339,10 @@ def get_ds_path(ds_uuid: str,
group_uuid = __get_dict_prop(dset, 'group_uuid')
if ent_type is None or ent_type.strip() == '':
raise ResponseException(f"Entity with uuid:{ds_uuid} needs to be a Dataset or Upload.", 400)
# if ent_type.lower().strip() == 'upload':
# return ingest_helper.get_upload_directory_absolute_path(group_uuid=group_uuid, upload_uuid=ds_uuid)
if ent_type.lower().strip() == 'upload':
return ingest_helper.get_upload_directory_absolute_path(group_uuid=group_uuid, upload_uuid=ds_uuid)
is_phi = __get_dict_prop(dset, 'contains_human_genetic_sequences')
if ent_type is None or not (
ent_type.lower().strip() == 'dataset' or ent_type.lower().strip() == 'publication' or ent_type.lower().strip() == 'upload'):
if ent_type is None or not (ent_type.lower().strip() == 'dataset' or ent_type.lower().strip() == 'publication'):
raise ResponseException(f"Entity with uuid:{ds_uuid} is not a Dataset, Publication or Upload", 400)
if group_uuid is None:
raise ResponseException(f"Unable to find group uuid on dataset {ds_uuid}", 400)
Expand Down