Skip to content

Commit

Permalink
hotfix: calculate max last_submission only if valid_datetimes present
Browse files Browse the repository at this point in the history
  • Loading branch information
nrjadkry committed Dec 14, 2023
1 parent c66f04c commit 0f2dfd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/backend/app/submission/submission_crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ def update_submission_in_s3(
]
last_submission = max(
valid_datetimes, key=lambda x: datetime.strptime(x, "%Y-%m-%dT%H:%M:%S.%fZ")
)
) if valid_datetimes else None

# Check if the file already exists in s3
s3_project_path = f"/{project.organisation_id}/{project_id}"
Expand Down

0 comments on commit 0f2dfd4

Please sign in to comment.