[IMP] sql_request_abstract: black, isort, prettier

pull/669/head
mariadforgeflow 2021-12-02 12:15:26 +01:00 committed by Sylvain LE GAL
parent 08cdb8097f
commit 01d76a12fe
2 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@
"version": "14.0.1.1.0",
"author": "GRAP,Akretion,Odoo Community Association (OCA)",
"maintainers": ["legalsylvain"],
"website": "https://github.com/OCA/server-tools",
"website": "https://github.com/OCA/reporting-engine",
"license": "AGPL-3",
"category": "Tools",
"summary": "Abstract Model to manage SQL Requests",

View File

@ -269,7 +269,7 @@ class SQLRequestMixin(models.AbstractModel):
res = self._hook_executed_request()
except ProgrammingError as e:
logger.exception("Failed query: %s", query)
raise UserError(_("The SQL query is not valid:\n\n %s") % e)
raise UserError(_("The SQL query is not valid:\n\n %s") % e) from e
finally:
self._rollback_savepoint(rollback_name)
return res