diff options
| author | Jacob Walls <jacobtylerwalls@gmail.com> | 2025-01-25 12:06:11 -0500 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2025-01-25 18:07:26 +0100 |
| commit | e9576c0aa86186e25b92c3c4f6b1bd7f20799db9 (patch) | |
| tree | 368dbc3d10671acbbafb07d6cf6c9eca7ec0e0ef /django | |
| parent | 93e18a87dd66caee80d033ae97fde65eea26cf5a (diff) | |
[5.2.x] Fixed #36111 -- Fixed test --debug-sql crash on Oracle when no prior query has executed.
Backport of 330d89d4fe7832355535580383523f1749a3ee45 from main
Diffstat (limited to 'django')
| -rw-r--r-- | django/db/backends/oracle/operations.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/backends/oracle/operations.py b/django/db/backends/oracle/operations.py index 79c6da994e..f66fa524b4 100644 --- a/django/db/backends/oracle/operations.py +++ b/django/db/backends/oracle/operations.py @@ -328,7 +328,7 @@ END; # Unlike Psycopg's `query` and MySQLdb`'s `_executed`, oracledb's # `statement` doesn't contain the query parameters. Substitute # parameters manually. - if params: + if statement and params: if isinstance(params, (tuple, list)): params = { f":arg{i}": param for i, param in enumerate(dict.fromkeys(params)) |
