Skip to content

Commit

Permalink
fix: precommit
Browse files Browse the repository at this point in the history
  • Loading branch information
Sujanadh committed Aug 13, 2024
1 parent 92261bc commit 47ca053
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/backend/app/submissions/submission_crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,8 +596,8 @@ async def upload_attachment_to_s3(
# Fetch existing photos from the database
existing_photos = db.execute(
text("""
SELECT submission_id, s3_path
FROM submission_photos
SELECT submission_id, s3_path
FROM submission_photos
WHERE project_id = :project_id
"""),
{"project_id": project_id},
Expand All @@ -622,7 +622,8 @@ async def upload_attachment_to_s3(
# Skip if the img_url already exists in the database
if img_url in existing_photos_dict.get(instance_id, []):
log.warning(
f"Image {img_url} for instance {instance_id} already exists in DB. Skipping upload."
f"Image {img_url} for instance {instance_id} "
"already exists in DB. Skipping upload."
)
continue

Expand Down

0 comments on commit 47ca053

Please sign in to comment.