Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 14, 2023
1 parent 0f2dfd4 commit f07aec2
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/backend/app/submission/submission_crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,9 +468,14 @@ def update_submission_in_s3(
for form in odk_forms
if form["lastSubmission"] is not None
]
last_submission = max(
valid_datetimes, key=lambda x: datetime.strptime(x, "%Y-%m-%dT%H:%M:%S.%fZ")
) if valid_datetimes else None
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 f07aec2

Please sign in to comment.