Skip to content

Commit

Permalink
fix(submission_crud): correct attachment key and await db commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Anuj-Gupta4 committed Jan 2, 2025
1 parent 5a38aee commit 93ce334
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/backend/app/submissions/submission_crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ async def upload_attachment_to_s3(
batch_insert_data = []
for instance_id in instance_ids:
submission_detail = await get_submission_detail(instance_id, project)
attachments = submission_detail["verification"]["image"]
attachments = submission_detail["image"]

if not isinstance(attachments, list):
attachments = [attachments]
Expand Down Expand Up @@ -358,7 +358,7 @@ async def upload_attachment_to_s3(
""",
batch_insert_data,
)
db.commit()
await db.commit()
return True

except Exception as e:
Expand Down

0 comments on commit 93ce334

Please sign in to comment.