Permalink
Browse files

[1.6.x] Fixed last_executed_query test failure on Oracle

Backport of c0a4894 from master.
  • Loading branch information...
1 parent 7788c71 commit ae685e54cb8b5d654180ac66b9fd4d68ad28a66b @shaib shaib committed with claudep Jul 8, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 django/db/backends/oracle/base.py
View
2 django/db/backends/oracle/base.py
@@ -267,7 +267,7 @@ def last_executed_query(self, cursor, sql, params):
# 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.

0 comments on commit ae685e5

Please sign in to comment.