Skip to content

Commit

Permalink
fix: get_study_metadata_path method update
Browse files Browse the repository at this point in the history
  • Loading branch information
oyurekten committed Dec 1, 2024
1 parent 98b4303 commit 75d221c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions metabolights_utils/provider/async_provider/study_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,14 +234,14 @@ async def get_file_path(

async def get_study_metadata_path(
self,
folder: Union[None, str],
study_id: Union[None, str],
folder: Union[None, str],
) -> Tuple[str, bool]:
if not folder:
study_path = await self.metadata_file_provider.get_study_metadata_path(
study_id
)
exist = await self.metadata_file_provider.exists(study_path)
exist = await self.metadata_file_provider.exists(study_id)
else:
study_path = folder
real_path = os.path.realpath(folder)
Expand Down Expand Up @@ -831,7 +831,7 @@ async def load_study(
if not study_id:
raise ValueError("invalid study_id")
exist = False
study_path, exist = await self.get_study_metadata_path(study_path, study_id)
study_path, exist = await self.get_study_metadata_path(study_id, study_path)

if not study_path:
raise ValueError("invalid study_path")
Expand Down
6 changes: 3 additions & 3 deletions metabolights_utils/provider/study_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,12 +232,12 @@ def get_file_path(

def get_study_metadata_path(
self,
folder: Union[None, str],
study_id: Union[None, str],
folder: Union[None, str],
) -> Tuple[str, bool]:
if not folder:
study_path = self.metadata_file_provider.get_study_metadata_path(study_id)
exist = self.metadata_file_provider.exists(study_path)
exist = self.metadata_file_provider.exists(study_id)
else:
study_path = folder
real_path = os.path.realpath(folder)
Expand Down Expand Up @@ -821,7 +821,7 @@ def load_study(
if not study_id:
raise ValueError("invalid study_id")
exist = False
study_path, exist = self.get_study_metadata_path(study_path, study_id)
study_path, exist = self.get_study_metadata_path(study_id, study_path)

if not study_path:
raise ValueError("invalid study_path")
Expand Down

0 comments on commit 75d221c

Please sign in to comment.