changed API endpoint from v2 to v3.
This commit is contained in:
@ -3,7 +3,7 @@ from argparse import Namespace
|
||||
from typing import Any
|
||||
from unicodedata import normalize
|
||||
|
||||
from mdrsclient.api import FolderApi
|
||||
from mdrsclient.api import FoldersApi
|
||||
from mdrsclient.commands.base import BaseCommand
|
||||
from mdrsclient.exceptions import IllegalArgumentException
|
||||
|
||||
@ -31,5 +31,5 @@ class MkdirCommand(BaseCommand):
|
||||
parent_folder = cls._find_folder(connection, laboratory, r_dirname)
|
||||
if parent_folder.find_sub_folder(r_basename) is not None or parent_folder.find_file(r_basename) is not None:
|
||||
raise IllegalArgumentException(f"Cannot create folder `{r_path}`: File exists.")
|
||||
folder_api = FolderApi(connection)
|
||||
folder_api = FoldersApi(connection)
|
||||
folder_api.create(normalize("NFC", r_basename), parent_folder.id)
|
||||
|
Reference in New Issue
Block a user