Skip to content

Commit

Permalink
Remove unused research and vault paths from collection details.
Browse files Browse the repository at this point in the history
  • Loading branch information
lwesterhof committed Oct 4, 2023
1 parent c1fd4a0 commit bd424ce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
10 changes: 1 addition & 9 deletions research.py
Original file line number Diff line number Diff line change
Expand Up @@ -647,19 +647,11 @@ def api_research_collection_details(ctx, path):
# Retrieve lock count.
lock_count = meta_form.get_coll_lock_count(ctx, path)

# Check if vault is accessible.
vault_path = ""
vault_name = group.replace("research-", "vault-", 1)
vault_coll = '/'.join(path.split('/')[0:3])
if collection.exists(ctx, vault_coll + "/" + vault_name):
vault_path = vault_name

return {"basename": basename,
"status": status.value,
"member_type": member_type,
"is_datamanager": is_datamanager,
"lock_count": lock_count,
"vault_path": vault_path}
"lock_count": lock_count}


@api.make()
Expand Down
9 changes: 1 addition & 8 deletions vault.py
Original file line number Diff line number Diff line change
Expand Up @@ -616,21 +616,14 @@ def api_vault_collection_details(ctx, path):
if user_name.startswith(("research-", "deposit-")):
research_group_access = True

# Check if research space is accessible.
research_path = ""
research_name = group.replace("vault-", "research-", 1)
if collection.exists(ctx, pathutil.chop(dirname)[0] + "/" + research_name):
research_path = research_name

result = {
"basename": basename,
"status": status,
"metadata": metadata,
"has_datamanager": has_datamanager,
"is_datamanager": is_datamanager,
"vault_action_pending": vault_action_pending,
"research_group_access": research_group_access,
"research_path": research_path
"research_group_access": research_group_access
}
if config.enable_data_package_archive:
import vault_archive
Expand Down

0 comments on commit bd424ce

Please sign in to comment.