Skip to content

Commit a47e841

Browse files
It's beyond me why this is implemented this way
1 parent a784075 commit a47e841

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

tidy3d/web/api/container.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,11 @@ def num_jobs(self) -> int:
675675
def upload(self) -> None:
676676
"""Upload a series of tasks associated with this ``Batch`` using multi-threading."""
677677
if self.simulation_type == "microwave":
678-
self._check_folder(self.folder_name, projects_endpoint="tidy3d/projects/rf")
678+
self._check_folder(
679+
self.folder_name,
680+
projects_endpoint="tidy3d/projects/rf",
681+
project_endpoint="tidy3d/project/rf",
682+
)
679683
else:
680684
self._check_folder(self.folder_name)
681685
with ThreadPoolExecutor(max_workers=self.num_workers) as executor:

tidy3d/web/core/task_core.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,11 @@ def list(cls, projects_endpoint: str = "tidy3d/projects") -> []:
5757

5858
@classmethod
5959
def get(
60-
cls, folder_name: str, create: bool = False, projects_endpoint: str = "tidy3d/projects"
60+
cls,
61+
folder_name: str,
62+
create: bool = False,
63+
projects_endpoint: str = "tidy3d/projects",
64+
project_endpoint: str = "tidy3d/project",
6165
):
6266
"""Get folder by name.
6367
@@ -74,7 +78,7 @@ def get(
7478
"""
7579
folder = FOLDER_CACHE.get(folder_name)
7680
if not folder:
77-
resp = http.get(projects_endpoint, params={"projectName": folder_name})
81+
resp = http.get(project_endpoint, params={"projectName": folder_name})
7882
if resp:
7983
folder = Folder(**resp)
8084
if create and not folder:

0 commit comments

Comments
 (0)