Skip to content

Commit

Permalink
fix: submitted study download error is fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
oyurekten committed Jun 23, 2024
1 parent 50055bc commit ad2cdc8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion metabolights_utils/provider/submission_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,12 @@ def download_submission_metadata_files(
url = self.rest_api_base_url.strip("/") + "/" + sub_path.strip("/")
try:
_time = descriptors[filename].created_at
modified = parser.parse(_time).timestamp()
try:
modified = datetime.datetime.strptime(
_time, "%Y-%m-%d %H:%M:%S"
).timestamp()
except ValueError:
modified = 0
remote_modified_time = int(modified)
except Exception:
remote_modified_time = None
Expand Down

0 comments on commit ad2cdc8

Please sign in to comment.