Skip to content

Commit

Permalink
fixed handling for folder_path for figshare
Browse files Browse the repository at this point in the history
  • Loading branch information
opaduchak committed Dec 19, 2024
1 parent e36b7ae commit 8902c4b
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ def get_node_guid(id_):


def get_root_folder_for_provider(node_settings, service_name):
node_settings: FigshareNodeSettings
match service_name:
case "dropbox":
return node_settings.folder
Expand All @@ -113,7 +114,12 @@ def get_root_folder_for_provider(node_settings, service_name):
case "mendeley":
return node_settings.list_id
case "figshare":
return f"{node_settings.folder_path}/{node_settings.folder_id}".replace(
folder_type = (
node_settings.folder_path
if node_settings.folder_path == "project"
else "article"
)
return f"{folder_type}/{node_settings.folder_id}".replace(
"dataset", "article"
)

Expand Down

0 comments on commit 8902c4b

Please sign in to comment.