Skip to content

Commit

Permalink
Added missing cursor commit for Aurora DB
Browse files Browse the repository at this point in the history
  • Loading branch information
azaylamba committed May 21, 2024
1 parent dd1e28d commit aec73d2
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ def deleteAuroraDocument(document_id: str, table_name: str):
sql.SQL("DELETE FROM {table} WHERE document_id = %s").format(table=table_name),
(document_id,),
)
cursor.connection.commit()
print(f"Deleted document {document_id} from {table_name}")
except psycopg2.Error as e:
print(f"An error occurred while deleting document from Aurora table: {e}")

0 comments on commit aec73d2

Please sign in to comment.