Skip to content

Commit

Permalink
Merge pull request #38 from 8848digital/bulk_operation_issue
Browse files Browse the repository at this point in the history
fix: Fixed trasaction aborted issue in bulk operation
  • Loading branch information
Satya8848 authored Nov 12, 2024
2 parents 2818f2b + aab252b commit 5802aee
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 5802aee

Please sign in to comment.