Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[1.6.x] Fixed last_executed_query test failure on Oracle

Backport of c0a4894 from master.
  • Loading branch information...
commit ae685e54cb8b5d654180ac66b9fd4d68ad28a66b 1 parent 7788c71
shaib authored July 08, 2013 claudep committed July 09, 2013

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  django/db/backends/oracle/base.py
2  django/db/backends/oracle/base.py
@@ -267,7 +267,7 @@ def last_executed_query(self, cursor, sql, params):
267 267
         # http://cx-oracle.sourceforge.net/html/cursor.html#Cursor.statement
268 268
         # The DB API definition does not define this attribute.
269 269
         statement = cursor.statement
270  
-        if not six.PY3 and not isinstance(statement, unicode):
  270
+        if statement and not six.PY3 and not isinstance(statement, unicode):
271 271
             statement = statement.decode('utf-8')
272 272
         # Unlike Psycopg's `query` and MySQLdb`'s `_last_executed`, CxOracle's
273 273
         # `statement` doesn't contain the query parameters. refs #20010.

0 notes on commit ae685e5

Please sign in to comment.
Something went wrong with that request. Please try again.