Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[1.5.x] 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.

Backpatch of ce094e5
  • Loading branch information...
commit 251f345db68278547fae520632765dc229a02a18 1 parent 8a99d71
Anssi Kääriäinen authored February 23, 2013

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

  1. 3  django/db/backends/oracle/base.py
3  django/db/backends/oracle/base.py
@@ -224,7 +224,8 @@ def last_executed_query(self, cursor, sql, params):
224 224
         if six.PY3:
225 225
             return cursor.statement
226 226
         else:
227  
-            return cursor.statement.decode("utf-8")
  227
+            query = cursor.statement
  228
+            return query if isinstance(query, unicode) else query.decode("utf-8")
228 229
 
229 230
     def last_insert_id(self, cursor, table_name, pk_name):
230 231
         sq_name = self._get_sequence_name(table_name)

0 notes on commit 251f345

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