Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed Oracle regression in last_executed_query() with unicode strings

The regression was likely caused by the fix in #19606 which adjusted
Oracle's unicode detection, though it seems this would have been an
issue in some configurations even before.
  • Loading branch information...
commit ce094e570e0ff085b88b2303e25124331f558e45 1 parent 09fcb70
Anssi Kääriäinen akaariai authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  django/db/backends/oracle/base.py
3  django/db/backends/oracle/base.py
View
@@ -270,7 +270,8 @@ def last_executed_query(self, cursor, sql, params):
if six.PY3:
return cursor.statement
else:
- return cursor.statement.decode("utf-8")
+ query = cursor.statement
+ return query if isinstance(query, unicode) else query.decode("utf-8")
def last_insert_id(self, cursor, table_name, pk_name):
sq_name = self._get_sequence_name(table_name)
Please sign in to comment.
Something went wrong with that request. Please try again.