Skip to content

Commit

Permalink
refactor: new local validation endpoint accepts user's api-token
Browse files Browse the repository at this point in the history
  • Loading branch information
oyurekten committed Nov 14, 2024
1 parent 2fe99c1 commit 4a1c0b8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions metabolights_utils/provider/submission_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ def validate_study_v2(
pool_period: int = 5,
retry: int = 20,
timeout: int = 30,
api_token: str = None,
):

sub_path = f"/study-model/validation"
Expand All @@ -451,8 +452,9 @@ def validate_study_v2(
calculate_data_folder_size=False,
calculate_metadata_size=False,
)

api_header, error = self.get_api_token()
api_header = api_token
if not api_token:
api_header, error = self.get_api_token()
api_name = "validation v2 get jwt token"
jwt_token = None
try:
Expand Down

0 comments on commit 4a1c0b8

Please sign in to comment.