diff options
| author | VIZZARD-X <vigneshanandmay13@gmail.com> | 2025-11-22 15:57:33 +0530 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2025-12-26 21:59:10 +0100 |
| commit | da19b3897dc7c2e99b120d40322b36b4f1a09fe8 (patch) | |
| tree | f080eda358cdb19733eb016660fa9a9a728aebd3 /django/db/backends/postgresql/operations.py | |
| parent | 6c2780ffe1aaf526e01287f9d0805143c23c7920 (diff) | |
Fixed #36112 -- Added fallback in last_executed_query() on Oracle and PostgreSQL.
Diffstat (limited to 'django/db/backends/postgresql/operations.py')
| -rw-r--r-- | django/db/backends/postgresql/operations.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/django/db/backends/postgresql/operations.py b/django/db/backends/postgresql/operations.py index 91456e3daf..5f4eda905f 100644 --- a/django/db/backends/postgresql/operations.py +++ b/django/db/backends/postgresql/operations.py @@ -302,11 +302,11 @@ class DatabaseOperations(BaseDatabaseOperations): try: return self.compose_sql(sql, params) except errors.DataError: - return None + return super().last_executed_query(cursor, sql, params) else: if cursor._query and cursor._query.query is not None: return cursor._query.query.decode() - return None + return super().last_executed_query(cursor, sql, params) else: @@ -315,7 +315,7 @@ class DatabaseOperations(BaseDatabaseOperations): # The query attribute is a Psycopg extension to the DB API 2.0. if cursor.query is not None: return cursor.query.decode() - return None + return super().last_executed_query(cursor, sql, params) if is_psycopg3: |
