Skip to content

Commit

Permalink
fix: Fixed trasaction aborted issue in bulk operation
Browse files Browse the repository at this point in the history
  • Loading branch information
patel-asif45 committed Nov 11, 2024
1 parent 5e5c76c commit aab252b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions frappe/database/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,9 @@ def sql(
try:
self._cursor.execute(query, values)
except Exception as e:
if self.db_type == "postgres":
frappe.db.rollback()

if self.is_syntax_error(e):
frappe.log(f"Syntax error in query:\n{query} {values or ''}")

Expand Down

0 comments on commit aab252b

Please sign in to comment.