From c0a4894dca4bda0053a56cd677c80340a68c4c95 Mon Sep 17 00:00:00 2001 From: Shai Berger Date: Mon, 8 Jul 2013 23:47:02 +0300 Subject: [PATCH] Fixed last_executed_query test failure on Oracle --- django/db/backends/oracle/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/db/backends/oracle/base.py b/django/db/backends/oracle/base.py index 04e70cfdb81..2d51d24b586 100644 --- a/django/db/backends/oracle/base.py +++ b/django/db/backends/oracle/base.py @@ -269,7 +269,7 @@ WHEN (new.%(col_name)s IS NULL) # http://cx-oracle.sourceforge.net/html/cursor.html#Cursor.statement # The DB API definition does not define this attribute. statement = cursor.statement - if not six.PY3 and not isinstance(statement, unicode): + if statement and not six.PY3 and not isinstance(statement, unicode): statement = statement.decode('utf-8') # Unlike Psycopg's `query` and MySQLdb`'s `_last_executed`, CxOracle's # `statement` doesn't contain the query parameters. refs #20010.